Answered

How to find integral over 2D image

If you want to have dW at the same resolution as your original image, just add the four terms together. If you want some local s...

How to find integral over 2D image

If you want to have dW at the same resolution as your original image, just add the four terms together. If you want some local s...

6 hours ago | 0

Answered

Intersection of a 2D polygon in 3D and a straight line

OK, you'll get a bit of pseudo-code/algebra, that solves most of the problem. Lets write the equation for the plane as: that ...

Intersection of a 2D polygon in 3D and a straight line

OK, you'll get a bit of pseudo-code/algebra, that solves most of the problem. Lets write the equation for the plane as: that ...

12 hours ago | 0

Answered

Gaussian envelope on the diagonal of a matrix

Something like this: [x,y] = meshgrid(0:32); M = exp(-(x-y).^2/4^2); imagesc(x(1,:),y(:,1),M) Adjust width as you see fit. ...

Gaussian envelope on the diagonal of a matrix

Something like this: [x,y] = meshgrid(0:32); M = exp(-(x-y).^2/4^2); imagesc(x(1,:),y(:,1),M) Adjust width as you see fit. ...

2 days ago | 1

Answered

How do I add scale markers to the legend, to indicate values for the sizes of points in a scatter plot?

I'd do something like: sz = 12:2:24; % your suitable selection for your dimentionC-mapping-to-size y4size = linspace(45,110,...

How do I add scale markers to the legend, to indicate values for the sizes of points in a scatter plot?

I'd do something like: sz = 12:2:24; % your suitable selection for your dimentionC-mapping-to-size y4size = linspace(45,110,...

3 days ago | 0

| accepted

Answered

Solved it, thanks anyway

Have a look at the help and documentation of the convhull function. HTH

Solved it, thanks anyway

Have a look at the help and documentation of the convhull function. HTH

3 days ago | 0

Answered

Differentiate with respect to a symbolic function

When I've used the Euler-Lagrange method I've used this tool: Euler-Lagrange tool (that handles this). If you need to solve a pr...

Differentiate with respect to a symbolic function

When I've used the Euler-Lagrange method I've used this tool: Euler-Lagrange tool (that handles this). If you need to solve a pr...

3 days ago | 1

Answered

Change folder that Matlab saves session information

Which version are you using? How much space does .matlab take? On my machine I have subdirectories for 2013a, 2015a and 2020a,...

Change folder that Matlab saves session information

Which version are you using? How much space does .matlab take? On my machine I have subdirectories for 2013a, 2015a and 2020a,...

4 days ago | 0

| accepted

Answered

Cannot calculate gradient of contour plot

If you modify your call to gradient to: [FU, FV] = gradient(F, diff(y(1:2)), diff(x(1:2))); You get a more reasonable set of q...

Cannot calculate gradient of contour plot

If you modify your call to gradient to: [FU, FV] = gradient(F, diff(y(1:2)), diff(x(1:2))); You get a more reasonable set of q...

4 days ago | 0

| accepted

Answered

I would like to take double integral over standard normal distribution but it does not work.

Your problem might be that the symbolic toolbox have no way of knowing that your correlation is between -1 and 1. If you try the...

I would like to take double integral over standard normal distribution but it does not work.

Your problem might be that the symbolic toolbox have no way of knowing that your correlation is between -1 and 1. If you try the...

4 days ago | 0

| accepted

Answered

I tried to run my script written in 2017a in R2020b: Error using load Unable to read file 'coast.mat'. No such file or directory. Any idea on how to solve it?

Well you will somehow find the missing file. The reason you now get the error is because matlab-2020b for some reason cannot fin...

I tried to run my script written in 2017a in R2020b: Error using load Unable to read file 'coast.mat'. No such file or directory. Any idea on how to solve it?

Well you will somehow find the missing file. The reason you now get the error is because matlab-2020b for some reason cannot fin...

5 days ago | 0

Answered

Why am I warned about defining variables in a nested function, when I don't?

Because nested functions share the name-space with its parrent function. That is all variables in the parrent function are avail...

Why am I warned about defining variables in a nested function, when I don't?

Because nested functions share the name-space with its parrent function. That is all variables in the parrent function are avail...

5 days ago | 4

Answered

How to write a video from png files and/or matlab figures

Try modifying your call to writeVideo to this: currFrame = getframe(gcf); writeVideo(vidObj,currFrame); HTH...

How to write a video from png files and/or matlab figures

Try modifying your call to writeVideo to this: currFrame = getframe(gcf); writeVideo(vidObj,currFrame); HTH...

5 days ago | 0

| accepted

Answered

how do i make this contour plot more presentable

The crossing contours confuse/worry me, are you adding additional contours from another data-set ontop of your contourf-plot? ...

how do i make this contour plot more presentable

The crossing contours confuse/worry me, are you adding additional contours from another data-set ontop of your contourf-plot? ...

5 days ago | 0

| accepted

Answered

Contourf fill smaller instead of larger

You "simply" have to create a colormap that is white (or suitable levels of pale, or black in case of that making more esthetic ...

Contourf fill smaller instead of larger

You "simply" have to create a colormap that is white (or suitable levels of pale, or black in case of that making more esthetic ...

6 days ago | 0

Answered

Is it possible to determine the angle of rotation for this graph?

If you have your signals in y1 and y2 you can try to use circshift with an incremental shift until you see a reasonable fit. You...

Is it possible to determine the angle of rotation for this graph?

If you have your signals in y1 and y2 you can try to use circshift with an incremental shift until you see a reasonable fit. You...

6 days ago | 0

| accepted

Answered

How to create 2D Polar (r, theta) mesh?

What's not good enough with something like this: n_phi = 15 phi = linspace(0,pi/2,n_phi+1); % should give you 15+1 edges and 1...

How to create 2D Polar (r, theta) mesh?

What's not good enough with something like this: n_phi = 15 phi = linspace(0,pi/2,n_phi+1); % should give you 15+1 edges and 1...

7 days ago | 1

Submitted

Skymap

SKYMAP An easy to use medium accuracy astronomical starchart, with high-resolution stellar spectra, and a intuitive GUI

7 days ago | 5 downloads |

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

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

9 days 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; ...

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

11 days ago | 1

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

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

13 days ago | 0

| accepted

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

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

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

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

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

19 days ago | 3 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...

21 days ago | 1

| accepted