Answered
Fourier transform of text data
help fft

15 years ago | 0

Answered
Working with variable in Simulink
I don't think you can do that. Let's clarify. You have a masked subsystem block which has a masked parameter. You put variable p...

15 years ago | 0

| accepted

Answered
Searching for a directory in matlab Path
I don't fully understand how exist('dirname','dir') works. If you need to find out the full path, I recommend the following code...

15 years ago | 0

Answered
Excel - xls problem
Not exactly fit but I think my answer to another question contains the solution. If you have difficulties, please post back. <h...

15 years ago | 0

Answered
cancel running program with crtl+c - is it possible to recover the processed data?
The data is not necessarily deleted. When you press ctrl+c, the program will stop. It usually tells you where it stopped. The da...

15 years ago | 0

Answered
How do I read in data from a spreadsheet to a Test Vector for a SystemTest of a Simulink Model, as datatype single?
You are using the SystemTest toolbox. It has some type of automation that can import data from Excel sheet behind the scene. I d...

15 years ago | 1

| accepted

Answered
Using saturated inputs in ode45
The check for limit is inside the function track(). The u1 and u2 you plotted are inside the function tracking(). They have noth...

15 years ago | 0

Answered
making a data series with 2 or 3 discrete pulse, rest are zero
%% Series=zeros(1024,1); RandPos=[10,13,50]; PulseHeight=2; Series(RandPos)=PulseHeight; Noise=rand(1024,1); ...

15 years ago | 0

Answered
Plot graph from Text data
Take a look at the data again. There are blank spot in a few places. Are they supposed to be that way, or are they some type of ...

15 years ago | 0

Answered
A quick xlsread, xlrwrite question - Multiple Cell Reference Input
Do xlsread() once. 41x3 matrix is not large at all. Doing xlsread() 41 times is not in-efficient. [Num,Txt,Raw]=xlsread('YourDa...

15 years ago | 0

| accepted

Answered
structured array help
%example data a(2,9).field1='text' a(2,9).field2=rand; %code prop=fieldnames(a); N_prop=length(prop); mat=ce...

15 years ago | 0

Answered
Need help about calling m file into Matlab command window/workspace ...
I did the following test. The problem is clear. The updated data.m file didn't take effect. With or without pause(0) didn't make...

15 years ago | 0

Answered
Relay block to generate signal PWM
You mean you have y=a*sin(t), 0.7<a<1? To derive a PWM signal from a sinusoidal wave based on its magnitude, you just need to co...

15 years ago | 1

| accepted

Answered
Need help about calling m file into Matlab command window/workspace ...
Add a line pause(0) after the line edit('data.m') in main.m and it should work. It forces MATLAB to refresh file/folder so th...

15 years ago | 0

Answered
substituting a column into a 3D matrix
It's not clear when you mention "last column" for a 3-D matrix. Hope you mean one of the following two cases. %% R=zeros...

15 years ago | 1

| accepted

Answered
Cobweb graph
There is a nice animation here. I think it needs some if-statement in your code. <http://en.wikipedia.org/wiki/Cobweb_plot>

15 years ago | 0

Answered
Simple fnc model has error message about || and && operators
There is a difference between && and &. && applies to scalar and & applies to vector. Try the following one at a time to see the...

15 years ago | 0

Answered
Get simulation time in a Simulink model
Using the pulse generator is the right approach. You could put your MATLAB fcn block inside a triggered subsystem block so you d...

15 years ago | 0

Answered
multiple function outputs
call it this way: [s,p]=sumprod(x1,x2)

15 years ago | 9

| accepted

Answered
xlswrite include date and time in filename
Specify your file name such: FileName=sprintf('FileName_%s.xlsx',datestr(now));

15 years ago | 0

| accepted

Answered
How can I index a matrix with only one number in Matlab inside a loop?
Use n-D array or cell array %n-D array x=zeros(12,19,73) for k=1:12 x(k,:,:)=rand(19,73); end % cell arr...

15 years ago | 2

| accepted

Answered
problem with stairs plot
What's wrong? try stairs(1:20,1:20)

15 years ago | 0

Answered
Matlab on Microsoft 2008 compute server
First of all, run bench a few times in a row till you get stable results. My result of first run of bench is much worse than the...

15 years ago | 0

Answered
Question about if - else and ploting
You need to understand the difference between && and & && applies to scalar, true && false & applies to vector, [true true] & ...

15 years ago | 0

| accepted

Answered
Rerun simulation without using the command line
Why do you have to re-load the model for every simulation run? You can load it once at the begining using open_system() or load_...

15 years ago | 0

Answered
Problem in exporting graph
Be careful, length, date are all MATLAB functions. Try not to use them as your variable name.

15 years ago | 0

Answered
sparse and non-integers
You don't have to modify j, just use sp=sparse(i,round(j),s)

15 years ago | 0

Answered
What is your time zone?
I want to keep it private.:) Would anyone be able to find it out, not by guessing when seeing my post, but by looking at my IP a...

15 years ago | 0

Answered
nargin
It is likely a bad code. The function has only one input argument so nargin<2 is always true. If you try to provide more than on...

15 years ago | 0

Answered
Get value from simulink model to matlab gui while simulink is running
I believe it can be done that way and it should apply to all types of blocks. Remember you can't just use get_param() alone, you...

15 years ago | 1

| accepted

Load more