Answered
How to use get_param?
I think your find_system() line probably will return many blocks. You need to narrow it down. Or just use a simple example, d...

15 years ago | 0

Answered
Cell Function
Since data is a cell array, you need to use {} to reference its element, like data{1}, data{2}, data{3}, etc. data{1} will be...

15 years ago | 0

Answered
Reading text file
One way to do it. %% clear; fid=fopen('test.txt'); str=textscan(fid,'%s','headerlines',1); fclose(fid); str=...

15 years ago | 0

| accepted

Answered
create a log space vector
Okay, then I think what you need is: a=0:19; b=2.^a; c=2300*b;

15 years ago | 0

| accepted

Answered
Regarding POLYFIT function in MATLAB
try p2(1) p2(2) p2(3) The "Getting Started" portion of the MATLAB documentation will be helpful for you. <http://www.ma...

15 years ago | 0

| accepted

Answered
Simulation time on Simulink
You set the start and stop time of your simulation model. If you set the start time to be 0, and the stop time to be 10 and then...

15 years ago | 0

| accepted

Answered
3d plotting help
You know the definition of you x, y and z axis. If you want to swap axis, why don't you change the x,y,z symbol in your equation...

15 years ago | 0

| accepted

Answered
time series 30 year sliding window
Since not all 30-year periods contain the same number of dates (due to leap year), you'll need to use cell array to have the 30-...

15 years ago | 1

| accepted

Answered
Tab completion of variable names in Editor
What version of MATLAB are you using? The feature is available. My 2010b version can do that. I think it probably starts at 2010...

15 years ago | 0

Answered
find structure
setdiff({A.name},{B.name})

15 years ago | 1

Answered
The music you listen to when you're Matlab-ing?
Once you are done debugging, play: sound(wavread('toilet.wav'))

15 years ago | 0

Answered
How to get started with matlab? How to get command window first time?
<http://www.mathworks.com/help/techdoc/learn_matlab/f0-20316.html>

15 years ago | 0

| accepted

Answered
3-d plotting surface and contour
Will this example help? %% A=peaks; surf(A+10); hold on; contour(A); grid on;

15 years ago | 0

Answered
How to remove header in .txt file while retaining format of data
To read it directly from the text file and got the format you want, you can do %% FID=fopen('test.txt','rt'); A = textsca...

15 years ago | 0

Answered
Reading a text file and assigning the values to matlab variables ?
help textread help textscan help load help importdata help uiimport

15 years ago | 0

| accepted

Answered
Simulink IF-block issue
In your model, click menu Simulation->Configuration Parameters... then click Data Import/Export at the left column, look at the...

15 years ago | 1

Answered
How to run simulation in real time
You can not run a Simulink simulation on your computer in real time. "Real time" here means the clock in Simulink goes at the sa...

15 years ago | 0

Answered
Loading / importing *.lvm file in matlab
Try this: <http://www.mathworks.com/matlabcentral/fileexchange/19913-lvm-file-import>

15 years ago | 0

Answered
Data and fprintf
Make Data like this: Data={'The calculated means for ERP0 are ','The standard deviations for ERP0 are ', 'The calculated mean...

15 years ago | 0

| accepted

Answered
loading a dataset (S=load('file_name'), how?
Once you loaded, S=data; clear data;

15 years ago | 0

| accepted

Answered
Can you have a Vector of bus signals in MatLab or Simulink
Not clear when you say "a vector of bus signals". Let's say wheel speed, you could have a vector of wheel speed, left-front, lef...

15 years ago | 0

| accepted

Answered
Able to run GUI from guide command interface, but not when opening .fig straight in folder
I can repeat what you did and got the same error. I didn't a quick debug and it seems that the GUI is not properly initialized. ...

15 years ago | 0

Answered
How to find the positions of a string which occurs multiple times
use textscan(), you may also need to use fopen(), fclose().

15 years ago | 0

Answered
how can calculate the rise time and settling time in simulink model?
What I suggest is to log the data and then run stepinfo(). You can add this one line command to the StopFcn callback of the mode...

15 years ago | 1

Answered
How to call a function m-file within another m-file
Just call that function. If you have a function called myfun defined in myfun.m, you can call it anywhere in another m file. ...

15 years ago | 0

| accepted

Answered
Automated data parsing into structure
Assume there are no blank lines in your original text file, you could do this. All the data is stored as string, but won't be ha...

15 years ago | 0

| accepted

Answered
Cell Arrays into normal functions
%% s1={'zzz' '23';'ppp' '43'}; a=s1(:,1) b=cell2mat(s1(:,2))

15 years ago | 0

Answered
discrete simulations?
If you are simulating a discrete system, then use the discrete solver with a fixed time step. If your system has a 40kHz sign...

15 years ago | 0

| accepted

Answered
comparing columns between differently sized matrices
%% SCM=[1 4 4 1 3 1 2 4 2 2 7 7]; VCM=[1 1 1 1 3 ...

15 years ago | 0

Answered
distance and matrix unique numbers
Do you mean this: %% X=[2.2000 3.3000 2.2000 3.3000 4.0000 5.0000 3.0000 5.0000]; in...

15 years ago | 0

Load more