Answered
SystemTest's Limit Check throws an error as the variable being tested on is empty. How do I get this LimitCheck working?
I think the problem might be that the signal is not logged. Do you have a signal label for that signal line? Does the "variableN...

15 years ago | 0

Answered
White text with black outline?
If you could find a system font that does it, something close to this? h=text(.2,.2,'text','fontsize',50,'fontname','Castellar'...

15 years ago | 0

Answered
Adding a masked subsytem to a model from script.
This is a little tricky. Right click the Simulink library at the library browser, choose 'Open the Simulink library'. Then doubl...

15 years ago | 2

| accepted

Answered
writing char array to a text file
There are many ways, depending what you want. a=['adc',char(10),'123'] dlmwrite('test.txt',a,'delimiter',''); edit te...

15 years ago | 4

| accepted

Answered
xlwrite, Object returned error code: 0x800A03EC,
The error code is caused by Excel. You can find lots of threads on the web. The Mathworks' website also has a few threads. It us...

15 years ago | 0

Answered
cellfun for objects
I am not sure about your class. But there is really no problem to make it work if you want it. You just need to make sure all th...

15 years ago | 0

Answered
How to read a text file with multiplel matrix data sets listed one after another
What is your desired output? Do you care about the text strings? The overall approach is to use textscan(). You can type help te...

15 years ago | 0

Answered
Assigning actual distance to a matrix
To create the grid for x and y axis is easy. What is your actual data sample look like? x=0:0.5:50; y=0:0.5:50

15 years ago | 0

Answered
Indexing way to look for specifc cell arrays in a cell array of cell arrays?
You probably need to do it using for-loops. %% A = { {'aa', 'bb'}, {'xx', 'yy'} }; B = { {'aa', 'bb'}, {'cc', 'dd'} }...

15 years ago | 0

Answered
Code generation of huge Embedded Matlab functions in Simulink
It could be a good use case for Model Reference. Put your large EMF block into a model and then reference it. As long as the EMF...

15 years ago | 1

Answered
Further question about using pcolor
To visualize a series of (x,y,z) data, I made the following example. The first part is just to come up with some data. The secon...

15 years ago | 0

Answered
persistent error message at command window prompt...
That is the MATLAB preference file. You don't seem to have access to that file. Do you have the access to that file? Can you ope...

15 years ago | 0

| accepted

Answered
Creating a text file through Matlab
What do you mean your program is in progress? If you want to keep a history of the commands executed in Command Window, use the ...

15 years ago | 0

| accepted

Answered
transforming an m-file to an anonymous or inline function
It is not recommended to use anonymous function due to the fact that the function has so many characters. If you wan to make it ...

15 years ago | 0

Answered
Eliminating 0 rows in a matrix with other rows having 0s and 1s
A few things: * size(spikes_21) returns two numbers, you might want to use size(..,1) or size(..,2) to be clar. * Your variable...

15 years ago | 0

Answered
PCS 7 / D7SYS -> Simulink
I don't think it's that easy. We've had task before to convert MatrixX/SystemBuild model to MATLAB/Simulink model. They are very...

15 years ago | 0

| accepted

Answered
Can you swap simulink blocks?
Yes, if you are up to writing a little bit script. I've done that. It's not that hard actually. The main function is replace_blo...

15 years ago | 0

Answered
searching cell array of strings
Or maybe strfind(), regexp(); C = {'hello' 'yes' 'no' 'goodbye'}; S='ye'; Found=strfind(C,S); Ind=~cellfun('isempt...

15 years ago | 0

Answered
Simple Piece of Code for improvement
I am amazed by Jan's insight. He seems to know without tic/toc. %% t1=0;t2=0;t3=0; for k=1:1000 % repeated run ...

15 years ago | 2

| accepted

Answered
ERROR: trouble solving algebraic loop - cant solve it
There is no definite way to resolve an algebraic loop problem. If you are sure your model is right, you can click menu Simulatio...

15 years ago | 0

| accepted

Answered
Reagrding reading file name
for k=1970:5:2000 FileStr=sprintf('v_CH_%d_II_1A*.txt'); Files=dir(FileStr); for j=1:length(Files) dat...

15 years ago | 0

Answered
Read Text file
use textscan() with the 'Headerlines' option.

15 years ago | 0

Answered
Simple Piece of Code for improvement
See if the following gives correct result and fast speed. A=FA*KS2; S2=sum(sum(SS2.*[sin(A);cos(A)]));

15 years ago | 2

Answered
matlab cannot save my figure
type 'help save' or 'doc save' for options of save() command. '-v7.3' is to allow support for data items greater than or equal t...

15 years ago | 0

Answered
Execute only once
I guess you want to declare your variable persistent. type doc persistent for example. To initialize, you can do if ~exist(...

15 years ago | 1

Answered
Web interface is broken
Problem confirmed!

15 years ago | 1

Answered
Keyboard characters become "messed up"
Did it happen in MATLAB Command Window or Editor? Before and after the problem happen, could you check menu File->Preferences->K...

15 years ago | 0

Answered
Bode Plot over time and frequency
Those are multiple Bode plots plotted together. There must be some parameters of the transfer function changed over the time whi...

15 years ago | 0

Answered
How to know which Signal is delayed !
Susan, Others don't have your data sample1 and sample2 so won't be able to look at your data. Would the sign of lags(delay), be ...

15 years ago | 0

Answered
Stuck with simple matrix calculation, can you help?
B=A.*V; SumA=sum(sum(A)); if SumA~=0 C=sum(sum(B))/SumA; end

15 years ago | 0

| accepted

Load more