Answered

Integration with both limits variable

Matlab has both a numerical and a symbolic version of the error-function. That will be the answer to your problem. The numeric v...

Integration with both limits variable

Matlab has both a numerical and a symbolic version of the error-function. That will be the answer to your problem. The numeric v...

15 hours ago | 0

Answered

Reduce computational time for ODE solver

Have you tried the other ODE-integrating functions? From your problem description it sounds like your ODEs are stiff - for that ...

Reduce computational time for ODE solver

Have you tried the other ODE-integrating functions? From your problem description it sounds like your ODEs are stiff - for that ...

1 day ago | 0

| accepted

Answered

2D colormaps. MxN matrix of RGB values for 4 colors gradient

If you do something like this: [hsvImg] = rgb2hsv(Imrgb); x_lims = [1 184; 199 383; 397 581; ...

2D colormaps. MxN matrix of RGB values for 4 colors gradient

If you do something like this: [hsvImg] = rgb2hsv(Imrgb); x_lims = [1 184; 199 383; 397 581; ...

3 days ago | 1

Answered

Integrating min and max function

This might not be the most elegant solution to this, but it's a first stab. Take a quick-look at what the function looks like: ...

Integrating min and max function

This might not be the most elegant solution to this, but it's a first stab. Take a quick-look at what the function looks like: ...

3 days ago | 0

Answered

Maximization of a Function

When I create a sequence of functions like that I always have to have the input-variables explicitly visible on the right-hand s...

Maximization of a Function

When I create a sequence of functions like that I always have to have the input-variables explicitly visible on the right-hand s...

4 days ago | 0

Answered

Improving the computation speed of loops

When you want to search for ways to optimize your code always run it with the profiler to identify where the time is spent. pro...

Improving the computation speed of loops

When you want to search for ways to optimize your code always run it with the profiler to identify where the time is spent. pro...

5 days ago | 0

Answered

Image fusion of 3 images

Perhaps: Im_fused = Im1/3 + Im2/3 + Im3/3; or more generally: w = [1 2 3]; w = w/sum(w); Im_wfused = w(1)*Im1 + w(2)*Im2 + ...

Image fusion of 3 images

Perhaps: Im_fused = Im1/3 + Im2/3 + Im3/3; or more generally: w = [1 2 3]; w = w/sum(w); Im_wfused = w(1)*Im1 + w(2)*Im2 + ...

5 days ago | 0

Answered

Legend Color doesn't Match the Curves Color

That's peculiar. What happens if you keep the plot-handle from your calls to semilogy and send that to legend? ph = semilogy(z,...

Legend Color doesn't Match the Curves Color

That's peculiar. What happens if you keep the plot-handle from your calls to semilogy and send that to legend? ph = semilogy(z,...

5 days ago | 0

Answered

Fourier transform of a picture?

Note that the actual Fourier transform is the second row of your equation, while the first factor you can see as a matrix with n...

Fourier transform of a picture?

Note that the actual Fourier transform is the second row of your equation, while the first factor you can see as a matrix with n...

9 days ago | 1

Answered

Harmonic Oscilation. When I plot f towards time amplitude is increasing I don't know why. It should be constant. what's wrong?

Well if you have an equation of motion you should write it as an ordinary differential equation and solve it with a more ambitio...

Harmonic Oscilation. When I plot f towards time amplitude is increasing I don't know why. It should be constant. what's wrong?

Well if you have an equation of motion you should write it as an ordinary differential equation and solve it with a more ambitio...

10 days ago | 0

| accepted

Submitted

Varying Point-Spread-Function

This contribution allows the user to apply image-blurring with a spatially varying PSF, and Lucy-Richardson type de-blurring of ...

10 days ago | 2 downloads |

Answered

Axis not working with loglog

Simple reason: log10(0) is a very small "number". So that is an impossible request. Also when you set the axis limits before plo...

Axis not working with loglog

Simple reason: log10(0) is a very small "number". So that is an impossible request. Also when you set the axis limits before plo...

12 days ago | 1

| accepted

Answered

Scaling Multiple Subplots to the Same Scale

A usefult tool to utilize for this is linkaxes - that allows you to something like this: for i1 = 1:many sph(i1) = subplot...

Scaling Multiple Subplots to the Same Scale

A usefult tool to utilize for this is linkaxes - that allows you to something like this: for i1 = 1:many sph(i1) = subplot...

16 days ago | 1

Answered

How can I create a break in the y-axis (looking like a flash; example below)?

There are several options on the File Exchange that claims to do exactly what you want. Have a look: FEX: break axis Tust a la...

How can I create a break in the y-axis (looking like a flash; example below)?

There are several options on the File Exchange that claims to do exactly what you want. Have a look: FEX: break axis Tust a la...

17 days ago | 0

Answered

In a random distribution of points in square area how can we determine the density information of points in each region

So this is simply counting the number of points in each region. You can do this "by hand" region-by-region, something like this:...

In a random distribution of points in square area how can we determine the density information of points in each region

So this is simply counting the number of points in each region. You can do this "by hand" region-by-region, something like this:...

17 days ago | 1

| accepted

Answered

How can I normalize images in matlab?

Once upon a time I had to make my own versions of histogram equalization because at that time that function in the image process...

How can I normalize images in matlab?

Once upon a time I had to make my own versions of histogram equalization because at that time that function in the image process...

17 days ago | 0

Submitted

contourinflectionpoints

contourinflectionpoints finds inflection-points on contour-lines

17 days ago | 12 downloads |

Answered

Can't call my function to another m file

If you have your third m-file in another directory and the first directory is not on the matlab-path then matlab will not know a...

Can't call my function to another m file

If you have your third m-file in another directory and the first directory is not on the matlab-path then matlab will not know a...

18 days ago | 0

| accepted

Answered

Solve first-order ordinary differential equations

Your calculation of grad_xm and grad_ym looks peculiar to me. Since you seem to use x and y for the coordinates of Vm, it seems ...

Solve first-order ordinary differential equations

Your calculation of grad_xm and grad_ym looks peculiar to me. Since you seem to use x and y for the coordinates of Vm, it seems ...

19 days ago | 1

| accepted

Answered

Satellite Orbit, Friction Acceleration Function

Recently I've good experiences using this tool: RKN1210 - A 12th/10th order Runge-Kutta-Nyström integrator It is sightly differ...

Satellite Orbit, Friction Acceleration Function

Recently I've good experiences using this tool: RKN1210 - A 12th/10th order Runge-Kutta-Nyström integrator It is sightly differ...

20 days ago | 0

| accepted

Answered

How can I add a zoom in the peak of the curve ?

My prefered tool for this is: on-figure-magnifier - at the moment, my preferences vary since you can find a range of similar too...

How can I add a zoom in the peak of the curve ?

My prefered tool for this is: on-figure-magnifier - at the moment, my preferences vary since you can find a range of similar too...

22 days ago | 1

Answered

Is there a way to optimise following loop using 1:end notation?

You should get an identical fft in one step if you do this: E1mat = fft(A,[],1); Here the third argument is the dimension of A...

Is there a way to optimise following loop using 1:end notation?

You should get an identical fft in one step if you do this: E1mat = fft(A,[],1); Here the third argument is the dimension of A...

22 days ago | 0

Answered

how to describe this matlab function?

At the commandline prompt type this: dbstop in select1 Then call the function from the commandline: select1 That will open t...

how to describe this matlab function?

At the commandline prompt type this: dbstop in select1 Then call the function from the commandline: select1 That will open t...

23 days ago | 0

Answered

pcolorm ignores lines of data

The way I've understood pcolor (which I assume pcolorm is a modification of) makes a colour-patch with corners at [x(n,m),y(n,m...

pcolorm ignores lines of data

The way I've understood pcolor (which I assume pcolorm is a modification of) makes a colour-patch with corners at [x(n,m),y(n,m...

23 days ago | 0

| accepted

Answered

Solving using an ode

You want to integrate your ode for a couple of values of s. To do that you can either create one ode-function for all 6 values o...

Solving using an ode

You want to integrate your ode for a couple of values of s. To do that you can either create one ode-function for all 6 values o...

23 days ago | 0

Answered

Splines: How to find vector/array from smoothing line (function - csaps), or another function (still using a smoothing parameter)?

For that purpose I used something like this: y_smoothed = fnval(pp, x); If you check out the documentation for Spline postproc...

Splines: How to find vector/array from smoothing line (function - csaps), or another function (still using a smoothing parameter)?

For that purpose I used something like this: y_smoothed = fnval(pp, x); If you check out the documentation for Spline postproc...

23 days ago | 1

| accepted

Submitted

contour_on_surf

3-D contour plot on a surface. Plot a contour on a 3-D surface, for example contour-plot of surface-temperature over a topograph...

24 days ago | 19 downloads |

Answered

Optimizing calculation in for loop for convolution

This should work: Hea = heaviside(x-tzero); % your shifted Heaviside sliding_gaussian=exp(-(x/sigma).^2); % Gaussian sliding_...

Optimizing calculation in for loop for convolution

This should work: Hea = heaviside(x-tzero); % your shifted Heaviside sliding_gaussian=exp(-(x/sigma).^2); % Gaussian sliding_...

25 days ago | 0

Answered

Blackbody curve fitting to data

This looks uggly. Matlab impresses me in this case, in that it still manages to obtain some kind of result. The uggliest problem...

Blackbody curve fitting to data

This looks uggly. Matlab impresses me in this case, in that it still manages to obtain some kind of result. The uggliest problem...

25 days ago | 0