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...

etwa 22 Stunden 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...

4 Tage 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...

4 Tage 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...

5 Tage 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...

6 Tage 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: ...

7 Tage 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

7 Tage 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

7 Tage 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...

8 Tage 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...

8 Tage 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...

18 Tage 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...

18 Tage 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...

18 Tage 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...

18 Tage ago | 0

Answered

How can I draw a kurdistan flag in matlab?

You can add something like this: phi360 = linspace(0,2*pi,43); r = 60 + 25*(-1).^(1:43); phi3...

How can I draw a kurdistan flag in matlab?

You can add something like this: phi360 = linspace(0,2*pi,43); r = 60 + 25*(-1).^(1:43); phi3...

19 Tage ago | 0

Answered

how to solve error occuring in underlined part?

Run this code, but set the debug condition to stop at errors: dbstop if error Then you'll get a debug-propmt at the line where...

how to solve error occuring in underlined part?

Run this code, but set the debug condition to stop at errors: dbstop if error Then you'll get a debug-propmt at the line where...

19 Tage ago | 1

Answered

How can I do the image stitching with constant overlap area?

Something like this works for a smallish toy-example: % Read image Im = imread('cameraman.tif'); % Generate some tiles with a...

How can I do the image stitching with constant overlap area?

Something like this works for a smallish toy-example: % Read image Im = imread('cameraman.tif'); % Generate some tiles with a...

21 Tage ago | 0

| accepted

Answered

How do I convert fractional display to decimal display ?

You might have set format to rat somewhere, perhaps in a startup.m or the like. You could get back to more normal decimal output...

How do I convert fractional display to decimal display ?

You might have set format to rat somewhere, perhaps in a startup.m or the like. You could get back to more normal decimal output...

22 Tage ago | 0

Answered

How to use interpolation instead of integrating in chunks with ODE45?

Too long code. But this is what I use for cases where I have to integrate ODEs with time-varying data for one parameter: functi...

How to use interpolation instead of integrating in chunks with ODE45?

Too long code. But this is what I use for cases where I have to integrate ODEs with time-varying data for one parameter: functi...

22 Tage ago | 1

| accepted

Answered

Solving Complex Line Integrals

Wouldn't it be simplest to just multiply the radius of the polar representation of your unit-circle with the desired radius? g ...

Solving Complex Line Integrals

Wouldn't it be simplest to just multiply the radius of the polar representation of your unit-circle with the desired radius? g ...

22 Tage ago | 2

| accepted

Answered

Integration with piecewise function

Doesn't this work: C_v4 = @(T) 0.0516*T.^3.*double(T<=0.6) + .432*T.^6.7.*double(0.6<T).*double(T<1.1) + 0.468*T.^5.6.*double(1...

Integration with piecewise function

Doesn't this work: C_v4 = @(T) 0.0516*T.^3.*double(T<=0.6) + .432*T.^6.7.*double(0.6<T).*double(T<1.1) + 0.468*T.^5.6.*double(1...

25 Tage ago | 0

Answered

Solve a set of ODEs with given initial conditions and final conditions

To me this seems to be a problem that the shooting-method would be suited for. That will require you to solve the problem multip...

Solve a set of ODEs with given initial conditions and final conditions

To me this seems to be a problem that the shooting-method would be suited for. That will require you to solve the problem multip...

25 Tage ago | 1

Answered

Matlab 2020a X11 forwarding crash

Perhaps the best solution is to run maltab in a VNC-vewer. That way you would avoid matlab having to rely on the X11 forwarding ...

Matlab 2020a X11 forwarding crash

Perhaps the best solution is to run maltab in a VNC-vewer. That way you would avoid matlab having to rely on the X11 forwarding ...

26 Tage ago | 0

Answered

Fitting nonlinear noisy data

When I do this I typically write my own error-function or residual-function and then use fminsearch (or some of the general opti...

Fitting nonlinear noisy data

When I do this I typically write my own error-function or residual-function and then use fminsearch (or some of the general opti...

26 Tage ago | 0

Answered

Alternate form of eval function

You'll have to learn good programming-habits and utilise the vectorized capabilities of matlab. This looks like a case where you...

Alternate form of eval function

You'll have to learn good programming-habits and utilise the vectorized capabilities of matlab. This looks like a case where you...

26 Tage ago | 0

| accepted

Answered

How to convert complex one sided spectrum into time domain

You can do something like this: function fft4real = symmetrize(fftOnesided) fft4real = [fftOnesided,0, fliplr(conj(fftOnesided...

How to convert complex one sided spectrum into time domain

You can do something like this: function fft4real = symmetrize(fftOnesided) fft4real = [fftOnesided,0, fliplr(conj(fftOnesided...

26 Tage ago | 0

| accepted

Answered

add Int8 and int16

Think about what input variables you have, what type they have and which one you need to cast to another data-type.

add Int8 and int16

Think about what input variables you have, what type they have and which one you need to cast to another data-type.

26 Tage ago | 0

Answered

how to add 2d plot in 3d?

I'd do something like this: clf surf(t,x,U+3,U),shading flat hold on pcolor(t,x,U),shading flat ax1 = gca; ax2 = axes('pos...

how to add 2d plot in 3d?

I'd do something like this: clf surf(t,x,U+3,U),shading flat hold on pcolor(t,x,U),shading flat ax1 = gca; ax2 = axes('pos...

27 Tage ago | 0

Answered

Transform 3D point cloud

If you have a 3-x-n array of point-coordinates you can rotate them in 2 ways, either rotate the points or the coordinate system....

Transform 3D point cloud

If you have a 3-x-n array of point-coordinates you can rotate them in 2 ways, either rotate the points or the coordinate system....

27 Tage ago | 1

Answered

How to apply the loop index on the output (filename) of the sprintf function?

In your "workspace" panel you see the values (sizes) of the variables as they are after completing the loop. Your filname-variab...

How to apply the loop index on the output (filename) of the sprintf function?

In your "workspace" panel you see the values (sizes) of the variables as they are after completing the loop. Your filname-variab...

27 Tage ago | 0

| accepted