Answered

How to extract values within a circular region from a griddata?

You "simply" only ask for the values inside that circular region. You can do it at least two different ways: N = 100; xv = lin...

How to extract values within a circular region from a griddata?

You "simply" only ask for the values inside that circular region. You can do it at least two different ways: N = 100; xv = lin...

2 months ago | 0

| accepted

Answered

2 equations, 2 unknowns - fminsearch(), fminunc() applied on numerical data

From your description you have 800-by-1300 linear equations of the type: a + x = b + y and you want to solve for both x and y....

2 equations, 2 unknowns - fminsearch(), fminunc() applied on numerical data

From your description you have 800-by-1300 linear equations of the type: a + x = b + y and you want to solve for both x and y....

2 months ago | 0

| accepted

Answered

Local variance estimation for image filtering

You get that result because medfilt2 will select the median value of the pixel-intensities of your region, and completely discar...

Local variance estimation for image filtering

You get that result because medfilt2 will select the median value of the pixel-intensities of your region, and completely discar...

2 months ago | 0

| accepted

Answered

How to read the coordinated from the plot in MATLAB 2018 version?

If you make a simple graph: ph = plot(X,Y); Then you can always extract the data-points from the plot-handle ph: xGraph = get...

How to read the coordinated from the plot in MATLAB 2018 version?

If you make a simple graph: ph = plot(X,Y); Then you can always extract the data-points from the plot-handle ph: xGraph = get...

2 months ago | 0

Answered

How to calculate the L2 (Euclidean) and L1 (cityblock, or we say Manhattan distance) distance based on longitude and latitude?

It seems to me that there is no obvious good definition of a Manhattan-distance on a spherical surface (even less so on a geoid)...

How to calculate the L2 (Euclidean) and L1 (cityblock, or we say Manhattan distance) distance based on longitude and latitude?

It seems to me that there is no obvious good definition of a Manhattan-distance on a spherical surface (even less so on a geoid)...

2 months ago | 0

| accepted

Answered

Colorbars belonging to more than one subplot/axis

perhaps something like this: figure(1) cx_12 = [min(min(var1(:)),min(var2(:))),max(max(var1(:)),max(var2(:)))]; cx_34 = [min(...

Colorbars belonging to more than one subplot/axis

perhaps something like this: figure(1) cx_12 = [min(min(var1(:)),min(var2(:))),max(max(var1(:)),max(var2(:)))]; cx_34 = [min(...

2 months ago | 0

| accepted

Answered

Processing large matrix faster

This ought to be done in one go: coods = M(:,M(:,3)<-80); In the case you cannot do it in a vectorized way and cannot determ...

Processing large matrix faster

This ought to be done in one go: coods = M(:,M(:,3)<-80); In the case you cannot do it in a vectorized way and cannot determ...

2 months ago | 0

Answered

From char to double for plotting

First you should store the data-sets in some kind of array. For the most tolerant storage (that doesn't care about different dim...

From char to double for plotting

First you should store the data-sets in some kind of array. For the most tolerant storage (that doesn't care about different dim...

2 months ago | 1

| accepted

Answered

Find 2D intersection in lat lon between curve (rivers) and satellite traces (2D polygon) on a map

If you have a single-pass of the satellite you could check what "river-points" are inside the ground-track with the inpolygon fu...

Find 2D intersection in lat lon between curve (rivers) and satellite traces (2D polygon) on a map

If you have a single-pass of the satellite you could check what "river-points" are inside the ground-track with the inpolygon fu...

2 months ago | 0

Answered

Is there a way in MATLAB to guess the values of a matrix just like in the EES software?

You can easily initialize your variable to a fixed-valued array: a = 17; t = 16.05*ones([1,round(a)]); If you want a function...

Is there a way in MATLAB to guess the values of a matrix just like in the EES software?

You can easily initialize your variable to a fixed-valued array: a = 17; t = 16.05*ones([1,round(a)]); If you want a function...

2 months ago | 0

Answered

Mass of a wire in shape of helix

The symbolic tools make the default interpretation that all variables are complex. Therefore it cannot make that simplification....

Mass of a wire in shape of helix

The symbolic tools make the default interpretation that all variables are complex. Therefore it cannot make that simplification....

2 months ago | 0

Answered

Diagnose Infeasibility of Simple 3-DoF Trajectory Optimization

Why not write the equation of motion component-by-component instead: function dydtd2ydt2 = dfu(~,y) g = 9.81; dydtd2ydt2 = ze...

Diagnose Infeasibility of Simple 3-DoF Trajectory Optimization

Why not write the equation of motion component-by-component instead: function dydtd2ydt2 = dfu(~,y) g = 9.81; dydtd2ydt2 = ze...

2 months ago | 0

Answered

Create a surface with separate contours from other plots

Just concatenate all your n-by-3 data into a large many-by-3 array and then check up the help and documentation of scatteredInte...

Create a surface with separate contours from other plots

Just concatenate all your n-by-3 data into a large many-by-3 array and then check up the help and documentation of scatteredInte...

2 months ago | 0

| accepted

Answered

How can I find rank of matrix?

First use pen (pencil) and paper to rewrite your equations into a normal matrix-form: Where M is a 4-by-4 matrix x is an arra...

How can I find rank of matrix?

First use pen (pencil) and paper to rewrite your equations into a normal matrix-form: Where M is a 4-by-4 matrix x is an arra...

2 months ago | 1

Answered

how to solve 3dof point mass equations of motion of flight vehicle

A three-degrees-of-freedom dynamic system in three spatial coordinates doesn't have yaw and pitch degrees of freedom. It is effe...

how to solve 3dof point mass equations of motion of flight vehicle

A three-degrees-of-freedom dynamic system in three spatial coordinates doesn't have yaw and pitch degrees of freedom. It is effe...

2 months ago | 0

Answered

Finding intersection between two 3D lines

You can do this rather automatic with geometry and linear algebra if you write your the positions and along lines as: If a...

Finding intersection between two 3D lines

You can do this rather automatic with geometry and linear algebra if you write your the positions and along lines as: If a...

2 months ago | 0

Answered

How to create mono phasic square waves with certain amplitude, pulse width and frequency for a certain time period

you could use square - for details check the help and documentation of that function. HTH.

How to create mono phasic square waves with certain amplitude, pulse width and frequency for a certain time period

you could use square - for details check the help and documentation of that function. HTH.

2 months ago | 0

| accepted

Answered

Full surface from scatter by griddata!!!

This is "just" a pixellation-problem. You can see how it comes about by varying the resolution of your grid: [xq,yq] = meshgrid...

Full surface from scatter by griddata!!!

This is "just" a pixellation-problem. You can see how it comes about by varying the resolution of your grid: [xq,yq] = meshgrid...

2 months ago | 1

| accepted

Answered

How to convert long to scientific e format in plots legend?

You could be a bit more explicit in the call to legend: txt = ['lambda = ',num2str(lambda(check))]; ph = plot(1:100, abs(Arec(...

How to convert long to scientific e format in plots legend?

You could be a bit more explicit in the call to legend: txt = ['lambda = ',num2str(lambda(check))]; ph = plot(1:100, abs(Arec(...

2 months ago | 0

Answered

how to make polar plot with N x M matrix

You can have a look at these file-exchange contributions: pcolor-in-polar-coordinates, perfect-polar-plots, 3d-polar-plot. Or y...

how to make polar plot with N x M matrix

You can have a look at these file-exchange contributions: pcolor-in-polar-coordinates, perfect-polar-plots, 3d-polar-plot. Or y...

2 months ago | 0

| accepted

Answered

Mutiple colorbars for mutiple scatter plots in the same figure

Have a look at the file exchange contribution newcolorbar-multiple-colormaps-in-the-same-axes. It seems as it should let you do ...

Mutiple colorbars for mutiple scatter plots in the same figure

Have a look at the file exchange contribution newcolorbar-multiple-colormaps-in-the-same-axes. It seems as it should let you do ...

2 months ago | 0

Answered

How to change the colours of bars in a histogram with multiple data

If you take the output from hist and plot that with bar, you can do something like this: [phH1,phH2] = hist([re_low' re_high'],...

How to change the colours of bars in a histogram with multiple data

If you take the output from hist and plot that with bar, you can do something like this: [phH1,phH2] = hist([re_low' re_high'],...

2 months ago | 0

| accepted

Answered

Three nonlinear equation with initial guess

Have a look at the help and documentation of fsolve. That should be the function for this task HTH

Three nonlinear equation with initial guess

Have a look at the help and documentation of fsolve. That should be the function for this task HTH

2 months ago | 0

Answered

Spectral Resampling from hyperspectral to multispectral

If you have a hyper-spectral image, I_hs, on the format [n_y x n_x x n_lambda] and you want to reduce the number of wavelength-c...

Spectral Resampling from hyperspectral to multispectral

If you have a hyper-spectral image, I_hs, on the format [n_y x n_x x n_lambda] and you want to reduce the number of wavelength-c...

2 months ago | 0

Answered

2D data fit lsqcurvefit with NaN in grid

You could try doing this with lsqnonlin: x = [1 2 4 6 8 10 13 17 21 25]; y = [0.2 0.5 1 2 4 7 10 14 18 22]; z =[1,0.6844,0.30...

2D data fit lsqcurvefit with NaN in grid

You could try doing this with lsqnonlin: x = [1 2 4 6 8 10 13 17 21 25]; y = [0.2 0.5 1 2 4 7 10 14 18 22]; z =[1,0.6844,0.30...

2 months ago | 0

| accepted

Answered

Calculation of consistent initial conditions for ODE

@Fabio Freschi, OK, now we're at least in the same general region of worrying. If I read decic correctly the use of the QR-outpu...

Calculation of consistent initial conditions for ODE

@Fabio Freschi, OK, now we're at least in the same general region of worrying. If I read decic correctly the use of the QR-outpu...

2 months ago | 0

| accepted

Answered

How to plot 3D suraface and contour lines?

To effectively use matlab sometimes one has to make functions vectorized - such that you can feed the function arrays and get al...

How to plot 3D suraface and contour lines?

To effectively use matlab sometimes one has to make functions vectorized - such that you can feed the function arrays and get al...

2 months ago | 0

| accepted

Answered

help code with lsqnonlin

At the very least you'll have to make Nest into a function - otherwise you have nothing to optimize. Perhaps something like this...

help code with lsqnonlin

At the very least you'll have to make Nest into a function - otherwise you have nothing to optimize. Perhaps something like this...

2 months ago | 0

Answered

Could you please help me generate following function and solve the integral?

To calculate the area under a curve specified by numerical arrays (x and y) you can use trapz: A = trapz(x,y); % Or in your c...

Could you please help me generate following function and solve the integral?

To calculate the area under a curve specified by numerical arrays (x and y) you can use trapz: A = trapz(x,y); % Or in your c...

2 months ago | 1

| accepted

Answered

Custom fitting using equation from differential function

Use matlabFunction to make a function out of the symbolic solution, then fit that one numerically to your data: R_a_fcn = matla...

Custom fitting using equation from differential function

Use matlabFunction to make a function out of the symbolic solution, then fit that one numerically to your data: R_a_fcn = matla...

2 months ago | 0

| accepted