Answered

How to draw cumulative histogram?

Simplest would be something like this: bins = [ 10 10 20 40 50 60 70 80 80 80 90 90 90 100 100 100 100 100 ]; data = [...

How to draw cumulative histogram?

Simplest would be something like this: bins = [ 10 10 20 40 50 60 70 80 80 80 90 90 90 100 100 100 100 100 ]; data = [...

9 days ago | 0

Answered

Problems using ODE45 using fmincon command for least square optimisation problem

Your first function is messed up with code after the end that closes the function myObjective, try this change function chisqua...

Problems using ODE45 using fmincon command for least square optimisation problem

Your first function is messed up with code after the end that closes the function myObjective, try this change function chisqua...

9 days ago | 0

Answered

How can I get then angle between a line connecting two points in the plot and a vector (with only direction specified)?

Best way to go about this is to convert the "wind"-direction to a wind-vector, then use: w_angle = atan2(norm(cross(wv,b)), dot...

How can I get then angle between a line connecting two points in the plot and a vector (with only direction specified)?

Best way to go about this is to convert the "wind"-direction to a wind-vector, then use: w_angle = atan2(norm(cross(wv,b)), dot...

12 days ago | 0

Answered

how to plot a multiple 4d array on same graph

It is still a bit unclear exactly what type of data you have, but multiple 4-D data in one graph is a lot of information to dige...

how to plot a multiple 4d array on same graph

It is still a bit unclear exactly what type of data you have, but multiple 4-D data in one graph is a lot of information to dige...

12 days ago | 0

| accepted

Answered

Error encountered with decomposing time series

try to call the function with either ,...,'model','additive') % property-value pairs or with a variable model my_model = 'add...

Error encountered with decomposing time series

try to call the function with either ,...,'model','additive') % property-value pairs or with a variable model my_model = 'add...

12 days ago | 0

Answered

Finding the correlation coefficient between two images

You should be able to get the 2 x 2 correlation matrix this way: ImgCorr = corrcoef(double(Im1(:)),double(Im2(:))); From that ...

Finding the correlation coefficient between two images

You should be able to get the 2 x 2 correlation matrix this way: ImgCorr = corrcoef(double(Im1(:)),double(Im2(:))); From that ...

12 days ago | 0

Answered

I have a variable named T_t which is of dimension [1 20]. How do i add a normal error with a standard deviation of 1 to it?

Well, you would only get a standard deviation approximately equal to 1 if you have T_t constant for all 20 elements. If you comp...

I have a variable named T_t which is of dimension [1 20]. How do i add a normal error with a standard deviation of 1 to it?

Well, you would only get a standard deviation approximately equal to 1 if you have T_t constant for all 20 elements. If you comp...

12 days ago | 0

| accepted

Answered

Visualising Volume Object Data

You could work with surf on each radial layer and set the surface property facealpha to something transparent. Perhaps something...

Visualising Volume Object Data

You could work with surf on each radial layer and set the surface property facealpha to something transparent. Perhaps something...

14 days ago | 0

| accepted

Answered

change in a image

The only meaningful interpretation I can come up with is that you have two images of the same scene taken from a static camera (...

change in a image

The only meaningful interpretation I can come up with is that you have two images of the same scene taken from a static camera (...

14 days ago | 0

Answered

use Tic Toc for function

Either scrap cellfun and loop over the elements of A, or plug tic-toc into your test-function.

use Tic Toc for function

Either scrap cellfun and loop over the elements of A, or plug tic-toc into your test-function.

14 days ago | 0

| accepted

Answered

Rename files within multiple subfolders (within multiple subfolders) to the name of the first subfolder.

Why not do something like: target_dir = fullfile('C:\Users\johan\Skrivbord\test'); source_root = fullfile('C:\Users\johan\Sk...

Rename files within multiple subfolders (within multiple subfolders) to the name of the first subfolder.

Why not do something like: target_dir = fullfile('C:\Users\johan\Skrivbord\test'); source_root = fullfile('C:\Users\johan\Sk...

17 days ago | 0

Answered

symbolic equation to numerical answer

Take a look at matlabFunction, it should be the function to use to convert a symbolic expression to a numerical functin. HTH

symbolic equation to numerical answer

Take a look at matlabFunction, it should be the function to use to convert a symbolic expression to a numerical functin. HTH

18 days ago | 0

| accepted

Answered

How to match scale of x axes in subplots, so that a given time period occupies same amount of x axis space in each subplot?

For this you can go a number of routes, one of the simlper would be to change the subplot call to: sph(r) = subplot(1,NumberOfP...

How to match scale of x axes in subplots, so that a given time period occupies same amount of x axis space in each subplot?

For this you can go a number of routes, one of the simlper would be to change the subplot call to: sph(r) = subplot(1,NumberOfP...

24 days ago | 0

Answered

FFT of Vibrationdata ASAP

Have a look at the spectrogram function, it should give you the signal spectra. If you really just want the fft, why not look at...

FFT of Vibrationdata ASAP

Have a look at the spectrogram function, it should give you the signal spectra. If you really just want the fft, why not look at...

26 days ago | 0

Answered

how to split a number

Perhaps something like this: GPSval = 2829.20246; GPSdeg = sign(GPSval)*floor(abs(GPSval/100)); GPSmin = GPSval - 100*GPSdeg;...

how to split a number

Perhaps something like this: GPSval = 2829.20246; GPSdeg = sign(GPSval)*floor(abs(GPSval/100)); GPSmin = GPSval - 100*GPSdeg;...

26 days ago | 0

| accepted

Answered

Customizing MATLAB Plots and Subplots

There are contributions on the FEX that facilitate multiple y-axises. This level of figure-tuning often (for me) turns into a b...

Customizing MATLAB Plots and Subplots

There are contributions on the FEX that facilitate multiple y-axises. This level of figure-tuning often (for me) turns into a b...

27 days ago | 1

Answered

Rotation Matrix 3D

Maybe something like this for your coordinates: r_all = [x(:),y(:),z(:)]; r_rotated = (rotz*r_all')'; Xr = x; Yr = y; Zr = ...

Rotation Matrix 3D

Maybe something like this for your coordinates: r_all = [x(:),y(:),z(:)]; r_rotated = (rotz*r_all')'; Xr = x; Yr = y; Zr = ...

27 days ago | 1

| accepted

Answered

building a non-uniform 2D grid for a specific interval

Many of matlab's functions need the input parameters to be on "plaid" grids (pcolor, surf, interp2, etc). That means that in ord...

building a non-uniform 2D grid for a specific interval

Many of matlab's functions need the input parameters to be on "plaid" grids (pcolor, surf, interp2, etc). That means that in ord...

28 days ago | 0

Answered

How to find the values of a function at any desired point given its value at some arbitrary points??

Five points worth of information is not a lot for interpolation in 3-D - plot the points and all their connections and see how u...

How to find the values of a function at any desired point given its value at some arbitrary points??

Five points worth of information is not a lot for interpolation in 3-D - plot the points and all their connections and see how u...

28 days ago | 1

| accepted

Answered

How to use slider bars to view images from a dataset?

Perhaps have a look at: Imthumb, it might not be exactly what you want, but it might be close enough for you to easily modify......

How to use slider bars to view images from a dataset?

Perhaps have a look at: Imthumb, it might not be exactly what you want, but it might be close enough for you to easily modify......

1 month ago | 0

Answered

How do I find the minimum pixel value for every point along a line automatically ?

Calculate the pixel intensities along a line-segment with interp2: x_line = 123:432; % or something like that y_line = linspac...

How do I find the minimum pixel value for every point along a line automatically ?

Calculate the pixel intensities along a line-segment with interp2: x_line = 123:432; % or something like that y_line = linspac...

1 month ago | 0

Answered

How to average Bimonthly into monthly and yearly?

Tips: have a look at the dir, for function and keyword repsectively. Presumably you have some function for reading your .tif-fil...

How to average Bimonthly into monthly and yearly?

Tips: have a look at the dir, for function and keyword repsectively. Presumably you have some function for reading your .tif-fil...

1 month ago | 0

Answered

Why does MAtLAB returns Error using eval undefined function or variable SI.

When you get an error like "undefined function or variable SI" you do this: whos SI % Would list all variables % See if you ge...

Why does MAtLAB returns Error using eval undefined function or variable SI.

When you get an error like "undefined function or variable SI" you do this: whos SI % Would list all variables % See if you ge...

1 month ago | 0

Answered

Elliptic Integrals in loop run too slow

First: scrap the Runge-Kutta! It is not a suitable scheme to solve equations of motion for charged particles in EM-fields. Inste...

Elliptic Integrals in loop run too slow

First: scrap the Runge-Kutta! It is not a suitable scheme to solve equations of motion for charged particles in EM-fields. Inste...

1 month ago | 1

| accepted

Answered

i need to compare a matrix with a static table

OK, how do you need to compare the first column of X with the first column of Y? Correlation? length of difference-vector? Angle...

i need to compare a matrix with a static table

OK, how do you need to compare the first column of X with the first column of Y? Correlation? length of difference-vector? Angle...

1 month ago | 0

Answered

Index in position 1 is invalid. Array indices must be positive integers or logical values.

OK, when you have a problem that simple (in terms of figuring out what is going on) you do this: dbstop if error Then rerun th...

Index in position 1 is invalid. Array indices must be positive integers or logical values.

OK, when you have a problem that simple (in terms of figuring out what is going on) you do this: dbstop if error Then rerun th...

1 month ago | 0

Answered

how to solve definite integrals in matlab

You have the quadgk, integral, et al. functions for numerical integration. If you have access to the symbolic toolbox you and wa...

how to solve definite integrals in matlab

You have the quadgk, integral, et al. functions for numerical integration. If you have access to the symbolic toolbox you and wa...

1 month ago | 0

| accepted

Answered

Defining font size in legend does not work

>> why The bald and not excessively bald and not excessively smart hamster obeyed a terrified and not excessively terrified ham...

Defining font size in legend does not work

>> why The bald and not excessively bald and not excessively smart hamster obeyed a terrified and not excessively terrified ham...

1 month ago | 0

Answered

How to create a plot for wave ordinary differential equation using symbolic toolbox of Matlab?

That is quite the general wave-function you have there... ...if my memmory serves me this equation have the solutions: u1 = ...

How to create a plot for wave ordinary differential equation using symbolic toolbox of Matlab?

That is quite the general wave-function you have there... ...if my memmory serves me this equation have the solutions: u1 = ...

1 month ago | 0

Answered

How can i use wiener filter to remove this sinusoidal noise?

You have to think about what type of noise you have - that is is it additive random intensity with no correlation on pixel-to-pi...

How can i use wiener filter to remove this sinusoidal noise?

You have to think about what type of noise you have - that is is it additive random intensity with no correlation on pixel-to-pi...

1 month ago | 1

| accepted