Answered
How to re-arrange swapped elements in an estimated vector as compared to a reference vector
Here is a different approach. It relies on the fact that you want the first three inputs to be in ascending numeric order, and i...

6 years ago | 0

| accepted

Answered
Within- & between-subjects in 'anovan'
This documentation page seems to be a pretty exhaustive description of how one can specify the test.

6 years ago | 0

Answered
The lot of plot doesn't shown
In your code, Throughput is just a single value, that gets overwritten during each iteration of the for loop. I'm guessing you ...

6 years ago | 0

Answered
How to plot mean scores of dataset with different number of variables
% Make up some pretend data data = rand(2922,23); % 1-320, 321-655, 656-1001, 1002-1338, 1339-1684, 1685-2027, 2028-2348, 23...

6 years ago | 1

| accepted

Answered
Sum up dissimilar values in a matrix
If M is your array ... sum(unique(M(M~=1)))

6 years ago | 0

| accepted

Answered
Reset the order of table columns
% Make the table x = rand(2,1); y = rand(2,1); tbl = table(x,y) % Rearrange the column order tbl = tbl(:,[2 1]);

6 years ago | 1

Answered
How can I use "IF" statement to prevent adding same element to an array?
Would it be acceptable to just remove duplicated rows after-the-fact? If so, you could do B = unique(B,'rows'); It seems likel...

6 years ago | 1

| accepted

Answered
Why is norm pdf 0 .3989?
You want normcdf(0) not normpdf(0)

6 years ago | 0

Answered
extracting specific data out of big data
Your question is not perfectly clear to me, especially regarding the size and shape of your input array(s) the exact output th...

6 years ago | 0

Answered
How to know the number of colunma having the magnitude and the row number in a matrix.
A = [ 6 5 3 1 9 2 4 6 8 5 12 14 6 18 16] row = 2; val = 6; find(A(row,:)==val)

6 years ago | 1

Answered
Bar plot with negative and positive values, stacked, and with non-zero base value
For what it is worth, this is not a bug. It is a change that was documented in the release notes for R2019b. It's in the Graphic...

6 years ago | 1

Answered
How to initialize an array such that the values satisfies an equation
I think if I were going to try to solve that problem, I would take as a starting point Roger Stafford's function randfixedsum, f...

6 years ago | 0

| accepted

Answered
Why is the output of power spectrum this shape?
I expect that the answer to your question is embedded in the Spectrum Computation section of the documentation for pspectrum.

6 years ago | 0

Answered
summing along 3rd dimension every 10 frames
Stephan provided a slick one-liner, but I think it might also be useful for you to see what mistakes you made. Here is a correct...

6 years ago | 0

Answered
Anybody know how to import excel file or other (table) using MATLAB MOBILE?
If the Excel file is available in your MATLAB Drive, then you have a variety of options. One simple one is readtable. tbl = rea...

6 years ago | 1

Answered
Correlation between two matrices
One possibility, which ignores any element for which A or B is NaN, is corrcoef(A,B,'rows','complete')

6 years ago | 1

Answered
How to re-arrange swapped elements in an estimated vector as compared to a reference vector
% Inputs u=[0.5 1 1.5 0.6981 1.3962 1.5707]; Est1=[0.499 1.002 1.5001 0.6890 1.3880 1.49998]; Est2=[0.9999 0....

6 years ago | 0

Answered
predicting CO2 using given data
Do you have the Statistic and Machine Learning Toolbox? If so then you could fit a simple linear model to your data like this: ...

6 years ago | 0

Answered
How to plot over a range using absolute value
One way to do it would be to create a grid that is larger than the one you need, but then overwrite the x-y grid values that do ...

6 years ago | 1

| accepted

Answered
Unpack arrayfun output into different variables
No, it is not possible. It is true that the output of arrayfun in this case is a 1x3 cell array. And you may feel that it is ob...

6 years ago | 0

| accepted

Answered
Disappear of z coordinate when plotting 3D
I think you can "manually" fix this by setting the view. For example, try view(15,15) after the plot is made. I've seen a cou...

6 years ago | 1

Answered
Helper Feature Vector2 Sequence
Do you have the Audio Toolbox installed? If you type ver at the command window prompt, do you see the Audio Toolbox listed?

6 years ago | 0

Answered
Plot range with semilogx
You needed element-wise instead of matrix division in these two lines: eta = (EfEm - 1)./(EfEm + xi); y70 = (1 + xi * eta * .7...

6 years ago | 1

| accepted

Answered
Hi, how can i proceed with this question, everytime i plot it, it doesn't show me my line. Can u guys help me
It's because you used a matrix division instead of an element-wise division to calculate y. Try this instead: y = (exp(x)./ sin...

6 years ago | 0

Answered
Multivariate Gaussian user defined function
I made a few changes: Define L as the first column of X, not just first value Ditto Y for second column Changed a couple matr...

6 years ago | 0

| accepted

Answered
VariableNames for table that begins with number
Yes. tbl = table([1;2;3],'VariableName',{'123abc'})

6 years ago | 0

| accepted

Answered
Quantile regression in Matlab
I am unaware of any built-in functions in MATLAB (including the Statistics and Machine Learning Toolbox) that perform quantile r...

6 years ago | 0

| accepted

Answered
while loops not work using randsample
The specific reason is that you never enter the first while loop, because the condition eq1<1 && eq2>1 is never true. I didn't...

6 years ago | 0

| accepted

Answered
Is there an equivalent to the '+=' operator in MATLAB?
No, MATLAB does not have that syntax. There is some prior discussion of this issue in this question.

6 years ago | 1

| accepted

Answered
Index in position 1 is invalid. Array indices must be positive integers or logical values.
>> format long >> index index = 1.729000100000000e+03 index is not equal to 1729.

6 years ago | 0

Load more