Question

How to calculate partial area-under-the-curve?

Hi all, I am trying to find the area under the curve (AUC) for a part of a graph. I use "trapz" function, but this function c...

5 years ago | 1 answer | 0

Question

How to assign results to varying filename?

Hi all, I am trying this: for i = 1:length(originalData) ['data_hz' '_' num2str(i)] = selectedData(x1:x2); end ...

5 years ago | 2 answers | 0

Question

How to vectorize a two matrices in row-wise multiplication (optimization)?

Hi Matlab users, I have the following code where N = 20000, "prt1" and "P" are both matrices of (20000x20000). As can be seen...

6 years ago | 1 answer | 0

Question

Optimization! Divide a vector by each element of another vector!

Dear all, I would like to optimize my code which looks like this: for n = 1:N prt1(n,:) = exp(exp1/n^2); end ...

6 years ago | 1 answer | 0

Question

How can I plot a time frequency plot (Please see attach)?

Hey matlab users. Please could anybody tell me how to plot a time frequency graph like what is shown in the attachment. All the...

6 years ago | 1 answer | 0

Question

How to find a minimum in a double peaked graph?

Hey all, Please plot the data below. You can see that there is a graph with double peaks around 100 and 200. I want to find t...

6 years ago | 0 answers | 0

Question

Change for-loop iteration inside the loop.

Dear Matlab users, I would like to change the For-loop iteration inside the loop if a condition is met. Suppose: for i =...

6 years ago | 2 answers | 1

Question

How to copy Matlab script in the word file?

Hello all, Please could you help me how to copy and paste my Matlab codes into a Word file in a way that it keeps the format,...

6 years ago | 0 answers | 0

Question

How to choose color in bsxfun?

Hey Matlab expert, If I have a matrix of <2000 x 4> I am using this code to plot in row: offset = 200; % Can be varied b...

6 years ago | 1 answer | 0

Question

How can I select a point in the figure by mouse?

Hi Matlab experts, I would like to plot (in 3D) a number of points which are selectable from the figure. Please see the image...

6 years ago | 2 answers | 0

Question

How to use Wavelet in my dataset?

Hi Matlab users, I am new in using Matlab Morlet wavelet function and not quite sure if I am in the right track! I have a EEG...

6 years ago | 0 answers | 0

Question

Plot several graphs with distance in Y-axis!

Hi Matlab experts, If we have matrix M with the size 20x100. I want to plot 20 rows (each row has 100 points) in one figur...

6 years ago | 1 answer | 0

Question

How to find a vector in a matrix?

Hi all, Assume a vector: v = [1:3:1000]; How can I find the number of columns of each value in the vector: x =...

6 years ago | 1 answer | 0

Question

Save Struct as .mat file!!!

Hello all, I have a problem in saving Struct format in .mat file. If I have "a" as 1x5 struct So, in command window i...

6 years ago | 2 answers | 0

Question

Find in a cell array?

Hello all, Suppose a cell array 10x1 consisted of random numbers from 1 to 5. How can I find the locations for number 5? ...

6 years ago | 2 answers | 4

Question

Ho to repeat a vector?

Hi all, Could anybody plz be a help me what is the build-in function for: |repvec (1:5, 2)| which results in: |ans =...

7 years ago | 4 answers | 0

Question

How to "accept" an answer to your question?

Hey all, Just realized that I cannot find the "accept the answer" button which used to be in page. Any idea how I can accept ...

7 years ago | 1 answer | 0

Question

"Return" and "continue" functions!

Hello MATLAB experts :) I have not got the concept of "return" and "continue" functions in MATLAB. I went through the hel...

7 years ago | 2 answers | 5

Question

How to load only one parameter from a .mat file which contains several parameter?

Hi MATLAB users, I've got a question which really helps me to do my calculations faster. Suppose we have a |data_collection.ma...

8 years ago | 1 answer | 0

Question

How can I change the color of text?

Hey MATLAB experts, I don't know ho to change the color of a text. For example: |a = input('Enter a value in the range of 0-...

8 years ago | 1 answer | 0

Question

How can I arrange an array in an ascending way?

Hello MATLAB users, If there are two arrays: |a=[5 8 14 15 17 19 22 23 26 31 34 35 36 39];| and |b=[25 30 34 42];|, how can I...

8 years ago | 1 answer | 0

Question

How can I find and use the codes for keyboard?

Hello MATLAB users, Could you please let me know how I can find the proper codes for each key in the keyboard and mouse and the...

8 years ago | 1 answer | 0

Question

How to extract the values that I want in a cell array?

Hey all, If we have: a={'1,17951,1,0' ; '1,20345,1,0' ; '1,22950,1,0' ; '1,25360,1,0'}; and I want to exclude 1,...,1,0 wh...

8 years ago | 3 answers | 0

Question

Finding the row and column in a cell array!

Hey everybody, |a={'Mk1326=Scanner,Scan'; 'Mk1327=Scanner,Scan';'Mk1328=Scan';'0,26685,1,0';'Mk1329=SyncStatus,Sync';'Mk1330=...

8 years ago | 1 answer | 0

Question

How to exclude unwanted numbers in a cell?

Hey MATLAB users, I've got a problem! If we have: |a={1,17951,1,0 ; 1,20345,1,0 ; 1,22950,1,0 ; 1,25360,1,0};| and I wan...

8 years ago | 1 answer | 0

Question

How to draw line vertical to Y-axis?

Hey Matlab users, If a = [1 2 3 4 5 6 7]; and b = [1 4 7 10 7 4 1]; and the plot it by : figure,plot(a,b), how can I draw let...

8 years ago | 6 answers | 1

Question

How to draw a verical line to x-axis in a graph?

Hey all, If |a = [1 2 3 4 5 6 7];| and |b = [1 4 7 10 7 4 1];| and the plot it by : |figure,plot(a,b)|, how can I draw let's ...

8 years ago | 1 answer | 0

Question

Spearman correlation in Matlab!

Hey Matlab users, If I have two series of data: |a = [1 4 6 3 4 6 7 8]; b [34 56 34 56 79 23 48 28];| and I want to pe...

8 years ago | 1 answer | 0

Question

Running a .m file in a computer which doesn't have Matlab installed!!!

Hey everybody, I was just wondering if there is any way to run a |.m| file in a computer in which there is no MATLAB software i...

8 years ago | 1 answer | 0

Question

Changing the scale of Y-Axis!

Hello, If |x = [1 2 3];| and |y = [6 7 9];| and I get |bar(x,y)| the y-axis contains the number between 1 to 9. Now I wann...

8 years ago | 1 answer | 0