Answered
outerline of plot with multiple peaks?
I'm going to go out on a limb and assuming you want to plot a line that overlaps the black curve until its end and then overlaps...

7 years ago | 0

| accepted

Answered
Trying to plot multiple values
That's because your code is breaking due to error at the following line of code on the first iteration of the second for-loop. ...

7 years ago | 0

Answered
1D array values to 2D matrix
A for-loop would make a cleaner read (I could provide that upon request) but here's two lines the do the trick. base = cellfu...

7 years ago | 1

| accepted

Answered
Define the color of a data sample in a plot based on the value of an array
If you're using a scatter plot, this is a simple method. figure colormap(jet) %choose color m...

7 years ago | 1

| accepted

Answered
someone please check my error
This line is producing the error: center=props(1).Centroid; and for whatever reason, I think props is empty. >> props = [];...

7 years ago | 0

Answered
How to reshape coordinate geography
Here you go reshape(data.', 50,4).'

7 years ago | 0

Answered
hi everyone , i need help to do this , thank u
The variable 'idx' tells you whether the minimum came from EA (idx=1) or EB (idx=2). Use that to pull out values from A and B a...

7 years ago | 0

| accepted

Answered
dir or ls are not working properly
You mentioned it is a remote folder. Often times changes made to remote folders after matlab has started wont' be recognized by...

7 years ago | 0

| accepted

Answered
How to a store Gaussian Mixture Models in a file ?
Why not just save to mat file save('my_gm_fits.mat', 'gm_list') and then retreive them when needed gm_list = load('my_gm_fit...

7 years ago | 0

Answered
rerun a matrix (made by rand vectors) until a condition is fullfiled
Here you go.... I made one simplification from your sample code: there's no need to transpose HH. %initialize flag sumIsOdd =...

7 years ago | 0

Answered
Only storing final for loop values
You're overwriting the t, I1 & I2 variables on each iteration. At the end of the loop, you're left with only the final values....

7 years ago | 1

| accepted

Answered
How to add more parameters to callback function.
The first two inputs for callback functions are fixed. You can add additional inputs by doing the following. function button_...

7 years ago | 0

| accepted

Answered
Hi, Can someone tell me how to remove (data1 that caused by the reference line) from legend?
Option 1 Turn off auto-updating so objects plotted after calling legend() do not appear on the legend. lgd = legend( 'theta 3...

7 years ago | 1

| accepted

Answered
Creating a question box with more than 3 options.
Use listdlg instead. https://www.mathworks.com/help/matlab/ref/listdlg.html Example (selectionMode is set to only allow 1 sel...

7 years ago | 0

| accepted

Answered
4D plot with matlab
It sounds like you've got data (stored in column 4) that vary on 3 axes (stored in cols 1:3). Perhaps a 3D contour plot or a 3D...

7 years ago | 0

Answered
i need help vectorizing this loop
You can't vectorize the circular shift so there's no way to get out of using the for-loop. It's fast, relatively concise, and e...

7 years ago | 0

Answered
matlab cell array indexing
[EDIT]: This only works with matrices (not cell arrays). I didn't notice the cell array term in the title of the question. ...

7 years ago | 0

Answered
Output argument of Matlab contour function
" For a given level, what is the ordering of the points returned by this function? " The contour matrix stored in the first out...

7 years ago | 1

Answered
not sure what is going wrong
Based on your other lines of code, muoppshot =[randi(100,Team1OppShots),1]; % _ error should...

7 years ago | 0

Answered
prevent _ from subscripting with suptitle
Store the handle and change the interpreter to 'none'. h = suptitle('my_super_title'); h.Interpreter = 'none'; See Steven L...

7 years ago | 0

| accepted

Answered
How to make the range shuffle a random amount of times.
"That way it makes it different every time I open matlab it is randomized hopefully differently." Option 1: shuffle rng('shuff...

7 years ago | 0

| accepted

Answered
White zero mean gaussian random process with different variance
Yes, normrnd() is the function you want to use. The second input specifies the sandard deviation. You are generating one sample...

7 years ago | 0

| accepted

Answered
Average over duplicate values in xlsx file
You can use findgroups() to split the rows into groups based on StimuliName. Then you can use splitapply() to apply a funciton ...

7 years ago | 0

Answered
code explanation question help!
'i' is an integer, index value. For the sake of the example, let's say i = 4. t(i) is the 4th value stored in 't'. t > t(...

7 years ago | 0

| accepted

Answered
Matrix dimensions must agree.
At line 37 (the line that contains Ek=abs(R5-R4)), the variable R5 is a [6x5] matrix while R4 is [1x4]. When subtracting matric...

7 years ago | 0

| accepted

Answered
Changing Histogram to PDF
Use histogram instead of hist. Then use histcounts along with the pdf option to get the pdf. h = histogram(y,50); p = histcou...

7 years ago | 0

| accepted

Answered
Is there a way to convert from Excel data to code conversion?
If any one knows how to implement this formula in matlab IFERRROR(+VLOOOKUP(A2,'File directory[Filename.xlsx]Lookup'!$A$1:N18, ...

7 years ago | 0

Answered
Expected a string scalar or character vector for the parameter name
The help section of the forecast() function shows that there are two inputs and then you can enter optional parameter-value pair...

7 years ago | 1

| accepted

Answered
Rearranging matrix from 5x6 to 5x5, removing remaining elements.
Using your matrix 'A' defined in the question, this solution horizontally shifts the data rightward moving to the next row after...

7 years ago | 0

| accepted

Answered
How can I change the units of a plot function in the plot tab?
After producing the plot, h = gca; h.XTickMode = 'manual'; h.XTickLabel = h.XTick * 5000; h.XLabel.String = 'Frequency (...

7 years ago | 1

| accepted

Load more