Answered

Horizontal First Differencer on a Matrix

Have a look on the help and documentation to diff. For this case use: y = diff(x,[],2); % or explicitly 1st difference: y = d...

Horizontal First Differencer on a Matrix

Have a look on the help and documentation to diff. For this case use: y = diff(x,[],2); % or explicitly 1st difference: y = d...

alrededor de 2 meses ago | 0

| accepted

Answered

How to remove space between subplots of heatmaps?

If you use the axes-handle output from subplot you can then set any of their properties as you desire: sph = subplot(3,1,1); %...

How to remove space between subplots of heatmaps?

If you use the axes-handle output from subplot you can then set any of their properties as you desire: sph = subplot(3,1,1); %...

alrededor de 2 meses ago | 0

Answered

If a structure exists in a file

You can explicitly check for the existense of a variable in a .mat-file: qwe = whos('-file','your-filename.mat','cDA_External_S...

If a structure exists in a file

You can explicitly check for the existense of a variable in a .mat-file: qwe = whos('-file','your-filename.mat','cDA_External_S...

alrededor de 2 meses ago | 0

| accepted

Answered

help debugging 3-D plot code

You have to get your equations for x, y and z right: x = a*cos(phi).*sin(theta); y = b*sin(phi).*sin(theta); z = b*cos(theta)...

help debugging 3-D plot code

You have to get your equations for x, y and z right: x = a*cos(phi).*sin(theta); y = b*sin(phi).*sin(theta); z = b*cos(theta)...

alrededor de 2 meses ago | 1

| accepted

Answered

Combined mean monthly values from 24 years of monthly data

Something like this perhaps: BV = table2array(baseline_values); clf subplot(2,1,1) imagesc(reshape(BV(:,4),12,[])') % Illust...

Combined mean monthly values from 24 years of monthly data

Something like this perhaps: BV = table2array(baseline_values); clf subplot(2,1,1) imagesc(reshape(BV(:,4),12,[])') % Illust...

alrededor de 2 meses ago | 0

Answered

Plotting negative values on an histogram

It seems likely that you've mixed up BinCounts and BinEdges - it doesn't make much sense to have a negative number of something ...

Plotting negative values on an histogram

It seems likely that you've mixed up BinCounts and BinEdges - it doesn't make much sense to have a negative number of something ...

alrededor de 2 meses ago | 0

Answered

M-point averaging filter to an image

Read the help and documentation for conv2. HTH

M-point averaging filter to an image

Read the help and documentation for conv2. HTH

alrededor de 2 meses ago | 0

Answered

Why doesn't the ode15s solver work when I switch 'k1q','k2q','k12q' from a single value into vectors(more values)?

When k1q is an array you will get an error when you try to assign the product of that array with the scalar C(1) to dCdt(1) whic...

Why doesn't the ode15s solver work when I switch 'k1q','k2q','k12q' from a single value into vectors(more values)?

When k1q is an array you will get an error when you try to assign the product of that array with the scalar C(1) to dCdt(1) whic...

alrededor de 2 meses ago | 1

| accepted

Answered

i am getting error in line 18 of invalid use of operator.please help me solving this

OK, so you want to solve 3 coupled equations of motion for some harmonically varying solution. First you have to understand the ...

i am getting error in line 18 of invalid use of operator.please help me solving this

OK, so you want to solve 3 coupled equations of motion for some harmonically varying solution. First you have to understand the ...

alrededor de 2 meses ago | 0

Answered

make a better map

You should try: shading flat instead of the interp option. You will have to accept the fact that you only have data in a 32-by...

make a better map

You should try: shading flat instead of the interp option. You will have to accept the fact that you only have data in a 32-by...

2 meses ago | 0

| accepted

Answered

Solving differential equations to get accurate plot as shown.

Since you get an oscillatory behaviour of (primarily) Cecm and Crec it is very likely that you have a bug for some of the reacti...

Solving differential equations to get accurate plot as shown.

Since you get an oscillatory behaviour of (primarily) Cecm and Crec it is very likely that you have a bug for some of the reacti...

2 meses ago | 0

Answered

How to use chebop function?

Have you installed the chebfun package? Have you added the chebfun install directory to the matlab-path? If you have it install...

How to use chebop function?

Have you installed the chebfun package? Have you added the chebfun install directory to the matlab-path? If you have it install...

2 meses ago | 0

| accepted

Answered

Improving speed of readtable

It is a rather large data-file to read. You might reduce the read-time if you use load instead of readtable - that should reduce...

Improving speed of readtable

It is a rather large data-file to read. You might reduce the read-time if you use load instead of readtable - that should reduce...

2 meses ago | 0

Answered

How to create and plot an oloid in MATLAB

Have a look at the help and documentation of the convhull function. That should give you a solution for this task - in the sense...

How to create and plot an oloid in MATLAB

Have a look at the help and documentation of the convhull function. That should give you a solution for this task - in the sense...

2 meses ago | 0

Answered

Multidimensional integration in matlab

Have a look at the help and documentation for integral2. That should be the function to do 2-D integrals, that sounds like the f...

Multidimensional integration in matlab

Have a look at the help and documentation for integral2. That should be the function to do 2-D integrals, that sounds like the f...

2 meses ago | 1

| accepted

Answered

Why does version R2020b gives errors when running functions such as fmincon, when version R2019a runs properly.

Have you installed the optimization toolbox in your 2020b install? If not that is where that function resides. Check the existe...

Why does version R2020b gives errors when running functions such as fmincon, when version R2019a runs properly.

Have you installed the optimization toolbox in your 2020b install? If not that is where that function resides. Check the existe...

2 meses ago | 0

| accepted

Answered

Simulation of Shepp Logan phaton dataset

The phantom-function is a standard .m-function available in source-code, so you can read it clean and plain. It is simply a func...

Simulation of Shepp Logan phaton dataset

The phantom-function is a standard .m-function available in source-code, so you can read it clean and plain. It is simply a func...

2 meses ago | 2

Answered

Different line types for multiple curves

Maybe you'll have to accept looping a little: lstl = {'-','--'}; for i1 = 1:4, set(p(i1),'linestyle',lstl{rem(i1,2)+1}) en...

Different line types for multiple curves

Maybe you'll have to accept looping a little: lstl = {'-','--'}; for i1 = 1:4, set(p(i1),'linestyle',lstl{rem(i1,2)+1}) en...

2 meses ago | 0

| accepted

Answered

Inputs must be floats, namely single or double.

When you integrate an ODE numerically there is no need whatsoever to introduce a declaration of T as a symbolic variable (the wa...

Inputs must be floats, namely single or double.

When you integrate an ODE numerically there is no need whatsoever to introduce a declaration of T as a symbolic variable (the wa...

2 meses ago | 1

Answered

error occurring while solving odes using ode15s

Check your mass-matrix E and make sure it looks exactly like you expect. The 3 off-diagonal 1s looks peculiar to me. Then you ha...

error occurring while solving odes using ode15s

Check your mass-matrix E and make sure it looks exactly like you expect. The 3 off-diagonal 1s looks peculiar to me. Then you ha...

2 meses ago | 0

| accepted

Answered

Find Peaks error - Expected X to be strictly increasing

Check that your X-variable is actually monotonically increasing (you might have replicate points, which then messes everything u...

Find Peaks error - Expected X to be strictly increasing

Check that your X-variable is actually monotonically increasing (you might have replicate points, which then messes everything u...

2 meses ago | 0

Answered

The legend does not show the right marker:

When using legend it is always preferable to use an array of handles returned from the plotting functions. Try something like: ...

The legend does not show the right marker:

When using legend it is always preferable to use an array of handles returned from the plotting functions. Try something like: ...

2 meses ago | 0

| accepted

Answered

stft for complex data

Shouldn't that be as simle as: Acmplx = I + 1i*Q; spec = fft(Acmplx); % or spectrogram etc HTH

stft for complex data

Shouldn't that be as simle as: Acmplx = I + 1i*Q; spec = fft(Acmplx); % or spectrogram etc HTH

2 meses ago | 0

Answered

How do I interpolate in 5d?

Have a look at the help and documentation for interpn. HTH

How do I interpolate in 5d?

Have a look at the help and documentation for interpn. HTH

2 meses ago | 0

Answered

Sparse matrix from the columns of an initial matrix

Something like this might work: vals = []; idx1 = []; idx2 = []; for j = 1:n idx1 = [idx1,1:n]; c...

Sparse matrix from the columns of an initial matrix

Something like this might work: vals = []; idx1 = []; idx2 = []; for j = 1:n idx1 = [idx1,1:n]; c...

2 meses ago | 0

Answered

Is there a way to adaptively sample 2-D surfaces ?

It is not entirely clear what your "problem situation" or "design desires" are. These might be very important for what type of s...

Is there a way to adaptively sample 2-D surfaces ?

It is not entirely clear what your "problem situation" or "design desires" are. These might be very important for what type of s...

2 meses ago | 0

Answered

Error using odearguments (line 21) When the first argument to ode23s is a function handle, the tspan argument must have at least two elements.

Your t variable will only have one component as you define it. My guess is that you want 100 elements between 0 and 1. If that's...

Error using odearguments (line 21) When the first argument to ode23s is a function handle, the tspan argument must have at least two elements.

Your t variable will only have one component as you define it. My guess is that you want 100 elements between 0 and 1. If that's...

3 meses ago | 0

| accepted

Answered

F(N) versus N plot for logistic differential equation

To solve for N you simply have to implement the ODE as a matlab-function, either as in an m-file or as an anonymous function-han...

F(N) versus N plot for logistic differential equation

To solve for N you simply have to implement the ODE as a matlab-function, either as in an m-file or as an anonymous function-han...

3 meses ago | 0

Answered

How can i draw Confidence interval graph for my data?...(i'm beginner)

The second graph is certainly not correct - since it is centred around zero and not around the average at each point, you have t...

How can i draw Confidence interval graph for my data?...(i'm beginner)

The second graph is certainly not correct - since it is centred around zero and not around the average at each point, you have t...

3 meses ago | 0

Answered

How can i make a colored 2d grid map, using a equation?

This is exactly what matlab is for, so you're thinking about the right tool. For a quick take-off I recommend you look through t...

How can i make a colored 2d grid map, using a equation?

This is exactly what matlab is for, so you're thinking about the right tool. For a quick take-off I recommend you look through t...

3 meses ago | 0