Answered

How to draw this graph using matlab code ignore the labeling

Find a similar plot at the MATLAB Plot Gallery, copy the code from there, and adapt it to your case.

How to draw this graph using matlab code ignore the labeling

Find a similar plot at the MATLAB Plot Gallery, copy the code from there, and adapt it to your case.

18 dagen ago | 1

Answered

Matrix - Vector value matching

In each iteration of the for loop, you are looking for the closest value (regardless of whether it is larger or smaller)? One wa...

Matrix - Vector value matching

In each iteration of the for loop, you are looking for the closest value (regardless of whether it is larger or smaller)? One wa...

18 dagen ago | 0

| accepted

Answered

How to check if a Database exists in MongoDB

I don't have any experience with MongoDB, but my guess is that this is not so much a MATLAB Database Toolbox question as it is a...

How to check if a Database exists in MongoDB

I don't have any experience with MongoDB, but my guess is that this is not so much a MATLAB Database Toolbox question as it is a...

18 dagen ago | 0

Answered

How to calculate the mean of 5 columns in a 12x80x250 array?

Q=Array(:,([8 13 27 45 52]),:); QMean = mean(Q,2); ArrayAndQMean = cat(2,Array,QMean); You could do it all in a one-liner...

How to calculate the mean of 5 columns in a 12x80x250 array?

Q=Array(:,([8 13 27 45 52]),:); QMean = mean(Q,2); ArrayAndQMean = cat(2,Array,QMean); You could do it all in a one-liner...

19 dagen ago | 0

| accepted

Answered

Convert double array into column vector

I'm not clear on the same point that James mentioned, but I'm going to guess that the reshape command is what you need.

Convert double array into column vector

I'm not clear on the same point that James mentioned, but I'm going to guess that the reshape command is what you need.

20 dagen ago | 0

Answered

Delete rows with bad data and surrounding rows

Here is one way. Bm2 = [ones(2,N); B(1:end-2,:)]; Bm1 = [ones(1,N); B(1:end-1,:)]; Bp1 = [B(2:end,:); ones(1,N)]; Bp2 = [B...

Delete rows with bad data and surrounding rows

Here is one way. Bm2 = [ones(2,N); B(1:end-2,:)]; Bm1 = [ones(1,N); B(1:end-1,:)]; Bp1 = [B(2:end,:); ones(1,N)]; Bp2 = [B...

24 dagen ago | 0

Answered

Modify matrix of long length to match another using unique datum values

Sounds like you need the ismember command, possibly with the 'rows' argument. The exact thing you want to do (matches only in f...

Modify matrix of long length to match another using unique datum values

Sounds like you need the ismember command, possibly with the 'rows' argument. The exact thing you want to do (matches only in f...

25 dagen ago | 0

| accepted

Answered

Plotting estimates (fixed effects) of a linear mixed-model

I could find know no mention in the documentation of the LinearMixedModel class that there is an equivalent object function or m...

Plotting estimates (fixed effects) of a linear mixed-model

I could find know no mention in the documentation of the LinearMixedModel class that there is an equivalent object function or m...

25 dagen ago | 0

Answered

How can I generate random single precision (float32) numbers ?

According to the documentation here, x = rand(10,1,"single") will do it. Your question has sufficient nuance that there could...

How can I generate random single precision (float32) numbers ?

According to the documentation here, x = rand(10,1,"single") will do it. Your question has sufficient nuance that there could...

26 dagen ago | 0

Answered

Is it possible to store string arrays of variable length as different rows in csv?

Here is one straightforward way. It requires the cellwrite function from File Exchange. % Original data s1 = ["A" "B" "C" ...

Is it possible to store string arrays of variable length as different rows in csv?

Here is one straightforward way. It requires the cellwrite function from File Exchange. % Original data s1 = ["A" "B" "C" ...

27 dagen ago | 0

| accepted

Answered

average value and confusion matrix

Are you having trouble with the math, or with the MATLAB? This wikipedia page for the confusion matrix can help you with all the...

average value and confusion matrix

Are you having trouble with the math, or with the MATLAB? This wikipedia page for the confusion matrix can help you with all the...

27 dagen ago | 0

Answered

shifting without for loop

If the vectors in the corresponding cell arrays are equal in length, then this straightforward code should work: M = 60; N = 2...

shifting without for loop

If the vectors in the corresponding cell arrays are equal in length, then this straightforward code should work: M = 60; N = 2...

28 dagen ago | 1

| accepted

Answered

Trouble to construct histogram stracked

Take a look at the MATLAB Plot Gallery, in particular the stacked bar chart example. (I think you want a bar chart, not a histog...

Trouble to construct histogram stracked

Take a look at the MATLAB Plot Gallery, in particular the stacked bar chart example. (I think you want a bar chart, not a histog...

28 dagen ago | 0

Answered

What is the difference between rand and copularand

It's a little difficult to know where to start with an explanation? Do you know what a copula is, and why it is used? If not, ma...

What is the difference between rand and copularand

It's a little difficult to know where to start with an explanation? Do you know what a copula is, and why it is used? If not, ma...

30 dagen ago | 0

| accepted

Answered

Problem with Power Regression

polyfit(...,2) is fitting a constant, linear, and quadratic term. Notice that the output vector p has three elements. You want t...

Problem with Power Regression

polyfit(...,2) is fitting a constant, linear, and quadratic term. Notice that the output vector p has three elements. You want t...

ongeveer een maand ago | 0

| accepted

Answered

Error SIGMA must be a symmetric positive semi-definite matrix

This issue will arise when you get pairwise asset correlations that are inconsistent. (The zeros are not necessarily the problem...

Error SIGMA must be a symmetric positive semi-definite matrix

This issue will arise when you get pairwise asset correlations that are inconsistent. (The zeros are not necessarily the problem...

ongeveer een maand ago | 0

Answered

K-Means: Indices of C in idx

I'm not certain I fully understand your question, but I'll make a guess. The centroid is not (necessarily) one of the points of...

K-Means: Indices of C in idx

I'm not certain I fully understand your question, but I'll make a guess. The centroid is not (necessarily) one of the points of...

ongeveer een maand ago | 1

| accepted

Answered

Change the format of x axis in a Kernel density plot.

Instead of the plot command, use semilogx.

Change the format of x axis in a Kernel density plot.

Instead of the plot command, use semilogx.

ongeveer een maand ago | 1

| accepted

Answered

Array indices must be positive integers or logical values.

You need to explicitly put in the multiplication sign: out(1)=(-k1*G2+k2*(G4-G2))/m1; and similarly in the assignment to out(3...

Array indices must be positive integers or logical values.

You need to explicitly put in the multiplication sign: out(1)=(-k1*G2+k2*(G4-G2))/m1; and similarly in the assignment to out(3...

ongeveer een maand ago | 1

Answered

Plot bar chart with log scale on y axis

There are some good thoughts on how to handle this problem in response to this question. In particular, the accepted answer by M...

Plot bar chart with log scale on y axis

There are some good thoughts on how to handle this problem in response to this question. In particular, the accepted answer by M...

ongeveer een maand ago | 0

Answered

How do I obtain standarized coefficients when applying a stepwise multilinear regression?

I'm not sure I would necessarily expect coefficients to be in that range, even for normalized variables. Can you quote a referen...

How do I obtain standarized coefficients when applying a stepwise multilinear regression?

I'm not sure I would necessarily expect coefficients to be in that range, even for normalized variables. Can you quote a referen...

ongeveer een maand ago | 0

| accepted

Answered

Generating musical note from given frequency

There is of course a lot that goes into what a note sounds like, beyond just the frequency. I expect MATLAB is generating the c...

Generating musical note from given frequency

There is of course a lot that goes into what a note sounds like, beyond just the frequency. I expect MATLAB is generating the c...

ongeveer een maand ago | 0

Answered

problem using hold on in a for loop

Your variable N is a single value -- a scalar. (It is an array of length 1.) You then define n to be the length of that array. S...

problem using hold on in a for loop

Your variable N is a single value -- a scalar. (It is an array of length 1.) You then define n to be the length of that array. S...

ongeveer een maand ago | 0

Answered

add a cell array in double for one more column in uitable

Convert the numeric array into a cell array before concatenating. Then use the cell array as the input to the uitable command. ...

add a cell array in double for one more column in uitable

Convert the numeric array into a cell array before concatenating. Then use the cell array as the input to the uitable command. ...

ongeveer een maand ago | 0

| accepted

Answered

Wrong axis value in correlation plot

I don't have the Econometrics Toolbox, so I can't confirm myself. But if that is really the only thing you did, then I think thi...

Wrong axis value in correlation plot

I don't have the Econometrics Toolbox, so I can't confirm myself. But if that is really the only thing you did, then I think thi...

ongeveer een maand ago | 0

| accepted

Answered

create table from matrix and cell variables

I'm not certain what you want, but I think this is it. % Make up some original inputs A = rand(18,257,176); B = cell(176,1); ...

create table from matrix and cell variables

I'm not certain what you want, but I think this is it. % Make up some original inputs A = rand(18,257,176); B = cell(176,1); ...

ongeveer een maand ago | 1

| accepted

Answered

How to apply function eig to an array of matrices?

cellfun(@eig,A,'UniformOutput',false) or something like this, will be at the heart of your solution. You might need to read the...

How to apply function eig to an array of matrices?

cellfun(@eig,A,'UniformOutput',false) or something like this, will be at the heart of your solution. You might need to read the...

ongeveer een maand ago | 0

Answered

Running Matlab, accents are replaced by question marks in the outputs

Your code renders correctly for me in R2019a, on a mac running mojave. There are some ideas in response to this question that c...

Running Matlab, accents are replaced by question marks in the outputs

Your code renders correctly for me in R2019a, on a mac running mojave. There are some ideas in response to this question that c...

ongeveer een maand ago | 1

Answered

How does mdl.Rsquared.Ordinary and mddl.Rsquared.Adjusted work?

R-squared and adjusted R-squared are invariant to scaling and mean-centering of the input data. So, you don't need to do it. But...

How does mdl.Rsquared.Ordinary and mddl.Rsquared.Adjusted work?

R-squared and adjusted R-squared are invariant to scaling and mean-centering of the input data. So, you don't need to do it. But...

ongeveer 2 maanden ago | 0

| accepted

Answered

How to copy first column, and replace other columns with this first column values in same array in MATLAB? (array size can vary)

If your original array is A, then I think A(mod(A,10)==1)=1; will do what you want.

How to copy first column, and replace other columns with this first column values in same array in MATLAB? (array size can vary)

If your original array is A, then I think A(mod(A,10)==1)=1; will do what you want.

ongeveer 2 maanden ago | 0