Answered
How to get the bin elements in histogram plots
[N,BIN] = HISTC(X,EDGES,...) also returns an index matrix BIN. If X is a vector, N(K) = SUM(BIN==K). BIN is zero for out o...

14 years ago | 2

Answered
Matlab sub-plotting with curve fitting
Curve fitting has nothing to do with sub-plotting. I am not sure if you are using subplot() or you mean different curves in the ...

14 years ago | 0

Answered
how to plot high dimensional data(scatter or scatter3)
A matrix of size 300x6 or 600x9 is not a dimension of 6 or 9. It's two dimensional with size of 300x6 or 600x9. Anyway, it is a ...

14 years ago | 0

Answered
Alternative to cell2mat
If f is a cell array of strings, you can run sort(f) directly. If you f contains numerical data, what do you try to sort of the ...

14 years ago | 1

Answered
how to do sequence for this case (alphabet)
One way to do it, construct your file names in the for-loops for k={'1210','1220'} for j='a':'n' FileName=str...

14 years ago | 0

Answered
Simulink function's output is it's input
Use the "Unit Delay" block from Simulink->Descrete library. Put it in the feedback loop. You can set an initial value for it too...

14 years ago | 0

| accepted

Answered
how to import the data from the cell array?
Use it the same way as you use an ordinary array, just replace the () reference with {}. For example d=rand(3); d(2,3) ...

14 years ago | 0

| accepted

Answered
Restoring library links
You need to be very careful about this type of operation. Depending on what do you mean by "parameters", I am not sure if you ca...

14 years ago | 0

| accepted

Answered
Listdlg outputs numbers, how to get cell array back from user input
course_reqd=course_list(course_comp)

14 years ago | 0

Answered
Break statements still result in the first condition breaking array element being shown - how can it be stopped from being generated?
One solution: %% A = [ 2 3 4 5 6 9 9 10] %(elements of A matches t) for t = 1:8; B(t) = 3*A(t); if B(t) >= 24 |...

14 years ago | 0

| accepted

Answered
importdata
What is the difference between these two computers, PC and non-PC? When you copy the files from one computer to another, do they...

14 years ago | 0

Answered
Ran script given to me. Error message: Function definitions are not permitted in this context.
You need to save your code into a file called simpvec.m function s=simpvec(n) s=2*ones(1,n+1); s(2:2:n)=4*ones(1,n/2)...

14 years ago | 0

Answered
how to mark the first and the last points on the plot
I don't fully understand your question or problem. Is this what you want? plot(1:1:100,data(1:1:100)); set(gca,'XTick',0:10...

14 years ago | 1

Answered
How to get X and Y values from a Scope Graph
Click the second buttons on the "Scope" block to access the scope parameters. Click the "Data history" tab, check "Save data to ...

14 years ago | 0

| accepted

Answered
Pass a parameter vector to an exe file
try system('myprogram.exe < InputParameters.txt') where InputParameters.txt is a text file that you created ahead of time, just ...

14 years ago | 1

| accepted

Answered
xlsread
You could use xlsfinfo() to get the sheet names and then you'll get the last sheet name. [A, DESCR, FORMAT] = XLSFINFO('FILEN...

14 years ago | 0

| accepted

Answered
renaming a cell
>> s=cell2struct(File1,naming,2) s = data1: [19x1 double] data2: [19x1 double] data3: [19x1 double] ...

14 years ago | 0

Answered
filter file list
If you are talking about the "Current Directory" window, you can sort by file extension by click the "Type" column. It's just li...

14 years ago | 0

Answered
Turning survey results into a bar graph
hist()

14 years ago | 0

| accepted

Answered
using actxserver
filenames returned by dir() is a structure array, not a cell array. Try it alone to understand how filenames look like. To get t...

14 years ago | 0

Answered
workspace to simulink
Use the "From Workspace" block, double click the block, click help to see document regarding the proper data format.

14 years ago | 0

Answered
Comparing Data to find third set of data
You should abstract your problem into a mathematical or MATLAB programming problem. Don't let the details of your application ob...

14 years ago | 0

| accepted

Answered
Get sum of similarites between rows
%% a = [ 1 2 3 4; 2 4 3 6; 4 2 3 9]; N_Row=size(a,1); Result=zeros(N_Row,N_Row-1); for k=1:N_row for j=k+1:...

14 years ago | 0

Answered
Animation in GUI
imread() can read .gif files. For movies, only .avi files and MATLAB movie structure are supported. See aviread(), movie2avi().

14 years ago | 1

Answered
Update section using Embedded matlab
I think you need to clear your thought. It sounds like that you want to use Embedded MATLAB Function to replace S-Function. To m...

14 years ago | 2

| accepted

Answered
How to freeze a random sample
What about 'seed'? I always use 'seed' as a way to uniquely identify a series of random data. As long as you specify the same se...

14 years ago | 0

Answered
user-defined functions
There is no limitation regarding the number of user-defined function blocks in a model. The performance depends on how well the ...

14 years ago | 2

| accepted

Answered
take one number from a name
%% FileName='Velo2_11022010_002_E5.xls'; d=regexp(FileName,'_','split') d = 'Velo2' '11022010' '002' ...

14 years ago | 1

| accepted

Answered
How to use Matlab script to find all the testpoints in Simulink model??
%% MyModel='f14'; open_system(MyModel); Lines=find_system(MyModel,'FindAll','On','LookUnderMasks','All','FollowLinks'...

14 years ago | 3

| accepted

Answered
How to plot overlapping parallel lines with a small offset to make them all visible?
plot() or stairs() can't do that, as others might just want the opposite. You have to process it yourself by adding an offset, ...

14 years ago | 0

Load more