Answered

Unusual arrangement of plot

Seems like you want the plot done with the radii sorted? (plot plots what you feed it, if you have the x-variable unsorted the p...

Unusual arrangement of plot

Seems like you want the plot done with the radii sorted? (plot plots what you feed it, if you have the x-variable unsorted the p...

1 month ago | 1

Answered

How to find the square root fo complex square

What's wrong with: sqrtZ = sqrt(Z); ? Then possibly work out the other root if necessary. HTH

How to find the square root fo complex square

What's wrong with: sqrtZ = sqrt(Z); ? Then possibly work out the other root if necessary. HTH

1 month ago | 0

Answered

Problem implementing finite difference method at edges of periodic functions

What I'd usualy have to do in this situation is to extract the differentiation matrices - just to check that all elements become...

Problem implementing finite difference method at edges of periodic functions

What I'd usualy have to do in this situation is to extract the differentiation matrices - just to check that all elements become...

1 month ago | 0

Answered

What starting point to choose so fsolve always returns a solution when any exists?

This depends on how you have parameterized your surface. For the most general case (curve - circle), where you have a curve para...

What starting point to choose so fsolve always returns a solution when any exists?

This depends on how you have parameterized your surface. For the most general case (curve - circle), where you have a curve para...

1 month ago | 1

Answered

How does MATLAB deal with wanted linear dependencies?

That's not the problem. What you should look at is how "wellconditioned" your model-matrix X is. Look at this example: [x,y] = ...

How does MATLAB deal with wanted linear dependencies?

That's not the problem. What you should look at is how "wellconditioned" your model-matrix X is. Look at this example: [x,y] = ...

1 month ago | 0

Answered

create freehand region of interest

Have a look at ginput (there are a couple of improved/modified versions on the file exchange), that function should give you the...

create freehand region of interest

Have a look at ginput (there are a couple of improved/modified versions on the file exchange), that function should give you the...

1 month ago | 0

Answered

What is the best way to animate a rocket trajectory through matlab?

I would look for some of the arrow-contributions on the file exchange: Arrow3, arrow - and then simply loop over time calculate ...

What is the best way to animate a rocket trajectory through matlab?

I would look for some of the arrow-contributions on the file exchange: Arrow3, arrow - and then simply loop over time calculate ...

2 months ago | 1

Answered

How to make a common color bar?

This is how I do this neatly: subplot(1,1,1) cbh = colorbar_labeled(''); subplot(2,2,3) plot([0 2]) subplot(2,2,2) imagesc...

How to make a common color bar?

This is how I do this neatly: subplot(1,1,1) cbh = colorbar_labeled(''); subplot(2,2,3) plot([0 2]) subplot(2,2,2) imagesc...

2 months ago | 0

| accepted

Answered

Subscript indices must either be real positive integers or logicals. how can i change? thanks!

Matlab uses 1-based indexing to vectors, so your line: i(0) = v0; %initial condition Has to be changed to: i(1) = v0; %initia...

Subscript indices must either be real positive integers or logicals. how can i change? thanks!

Matlab uses 1-based indexing to vectors, so your line: i(0) = v0; %initial condition Has to be changed to: i(1) = v0; %initia...

2 months ago | 0

Answered

finding all local minima of histogram

If you read the help of the hist function you'll find: N = HIST(Y) bins the elements of Y into 10 equally spaced containers...

finding all local minima of histogram

If you read the help of the hist function you'll find: N = HIST(Y) bins the elements of Y into 10 equally spaced containers...

2 months ago | 0

Answered

Cut a matrix after a certain value

Try: rowNum = find(any(Acum1 > 2500,2),1,'first'); % 1440*60= 86400 secondi. รจ il tempo disponibile nella giornata if isempty(...

Cut a matrix after a certain value

Try: rowNum = find(any(Acum1 > 2500,2),1,'first'); % 1440*60= 86400 secondi. รจ il tempo disponibile nella giornata if isempty(...

2 months ago | 0

| accepted

Answered

scatteredInterpolant giving unexpected plateaus

When I tried to download the mat-file I get nothing when I try to load it, it seems empty, could you check that the one you actu...

scatteredInterpolant giving unexpected plateaus

When I tried to download the mat-file I get nothing when I try to load it, it seems empty, could you check that the one you actu...

2 months ago | 0

Answered

Visualization of 4D Plot

Perhaps you're asking for something like this: [X,Y,Z] = cylinder(linspace(1,1.5,100),100); % You have to specify your cylinder...

Visualization of 4D Plot

Perhaps you're asking for something like this: [X,Y,Z] = cylinder(linspace(1,1.5,100),100); % You have to specify your cylinder...

2 months ago | 0

| accepted

Answered

Linear least squares overdetermined system

If I understand your problem correct you want to solve a reasonably large number of very small linear systems? In that case you...

Linear least squares overdetermined system

If I understand your problem correct you want to solve a reasonably large number of very small linear systems? In that case you...

2 months ago | 0

Answered

[solved] difference between 2 spectrograms

Spectrogram called without input arguments seems to plot log10 of the power. try this: im = pcolor(h/1000,(t/60),log10(abs((s')...

[solved] difference between 2 spectrograms

Spectrogram called without input arguments seems to plot log10 of the power. try this: im = pcolor(h/1000,(t/60),log10(abs((s')...

2 months ago | 1

Answered

ODE45 Solution for a coupled equation

When running your function I get an initial growth of T, which is due to the k_ISC*n(1) term in your ode - that would represent ...

ODE45 Solution for a coupled equation

When running your function I get an initial growth of T, which is due to the k_ISC*n(1) term in your ode - that would represent ...

2 months ago | 0

| accepted

Answered

How can I create a subplot of ode45 for a mass spring damper where the two plots have a different k value?

Simply add another parameter to your msdfunc for k: function zprime= msdfunc(t,z,k) m = 4; b = 0.25; if nargin < 2 || isempty...

How can I create a subplot of ode45 for a mass spring damper where the two plots have a different k value?

Simply add another parameter to your msdfunc for k: function zprime= msdfunc(t,z,k) m = 4; b = 0.25; if nargin < 2 || isempty...

2 months ago | 1

| accepted

Answered

Solving nonlinear diferential equations system

That's a system of coupled first-order ODEs. Have a look at the help and documentation for ode45, ode23. HTH

Solving nonlinear diferential equations system

That's a system of coupled first-order ODEs. Have a look at the help and documentation for ode45, ode23. HTH

2 months ago | 1

Answered

How to generate Publication quality( for conferences/Journals) figures in MATLAB?

In the File menu go to print preview - from there you can set a number of different behaviours of matlab's print. Then print you...

How to generate Publication quality( for conferences/Journals) figures in MATLAB?

In the File menu go to print preview - from there you can set a number of different behaviours of matlab's print. Then print you...

2 months ago | 1

| accepted

Answered

How to perform convolution with a dataset?

In matlab this should be as simple as f = A*(C*exp(alpha*t + D*exp(beta*t))); % or whatever you have for that part. G = psf; ...

How to perform convolution with a dataset?

In matlab this should be as simple as f = A*(C*exp(alpha*t + D*exp(beta*t))); % or whatever you have for that part. G = psf; ...

2 months ago | 0

Answered

Plot a scalar as a function of a parameter

It should be as simple as: for n = 1:N for t = 2:T pipiVal(1,n) = pipiC(t,n); % or however you get the phipi-values cor...

Plot a scalar as a function of a parameter

It should be as simple as: for n = 1:N for t = 2:T pipiVal(1,n) = pipiC(t,n); % or however you get the phipi-values cor...

2 months ago | 0

Answered

How do I create a colormap for a flat plane?

Use something like this: surf(x,y,z-1,x+0.5*y),shading flat You can use whichever linear combination of x and y to have your g...

How do I create a colormap for a flat plane?

Use something like this: surf(x,y,z-1,x+0.5*y),shading flat You can use whichever linear combination of x and y to have your g...

2 months ago | 0

| accepted

Answered

PLOT THE GRAPH OF VECTOR FUNCTIONS

So you want to plot a vector-function , where gives you 3-element vectors at points in 3-D space. For that you might get what...

PLOT THE GRAPH OF VECTOR FUNCTIONS

So you want to plot a vector-function , where gives you 3-element vectors at points in 3-D space. For that you might get what...

2 months ago | 1

Answered

How do I plot interpolated grid data and original datapoint set in the same plot?

You can always simply plot all your points: plot3(Xi,Yi,Zi,'r.') Or with scatter: scatter(Xi,Yi,32,Zi,'filled') But to me th...

How do I plot interpolated grid data and original datapoint set in the same plot?

You can always simply plot all your points: plot3(Xi,Yi,Zi,'r.') Or with scatter: scatter(Xi,Yi,32,Zi,'filled') But to me th...

2 months ago | 0

| accepted

Answered

How to save figures from foor loop in separate folders

Generate your file-names with fullfile (that way you can have multiple directories in a cell-array, one for each of your wanted ...

How to save figures from foor loop in separate folders

Generate your file-names with fullfile (that way you can have multiple directories in a cell-array, one for each of your wanted ...

2 months ago | 0

| accepted

Answered

How to integrate a function u^3/(exp(u)-1) in the range of [0 0.033]??.

if numerical integration is good enough: Val = integral(@(x) x.^3./(exp(x)-1),0,0.033) % for which I get: 1.1831e-05 HTH

How to integrate a function u^3/(exp(u)-1) in the range of [0 0.033]??.

if numerical integration is good enough: Val = integral(@(x) x.^3./(exp(x)-1),0,0.033) % for which I get: 1.1831e-05 HTH

2 months ago | 0

Answered

maximum value in scatter plot

Well that sounds like a task for histogram2, or any of the number of 2-D histogram functions available on the file exchange. The...

maximum value in scatter plot

Well that sounds like a task for histogram2, or any of the number of 2-D histogram functions available on the file exchange. The...

2 months ago | 0

| accepted

Answered

Create coordinates on a convex hull

Perhaps this function is overkill, but to me it seems as if this FEX-contribution should help: xy2sn, I don't know if it is the...

Create coordinates on a convex hull

Perhaps this function is overkill, but to me it seems as if this FEX-contribution should help: xy2sn, I don't know if it is the...

2 months ago | 0

Answered

how to draw a 3d surface of exp(x+iy)

Have a look at the dcolor submission to the file exchange. That should give you a good starting point for doing this. There ar...

how to draw a 3d surface of exp(x+iy)

Have a look at the dcolor submission to the file exchange. That should give you a good starting point for doing this. There ar...

2 months ago | 1

Answered

Rotate 3D quiver

Matlab uses right-handed coordinate systems (sensible), with the default convention that z is in the upward vertical direction i...

Rotate 3D quiver

Matlab uses right-handed coordinate systems (sensible), with the default convention that z is in the upward vertical direction i...

2 months ago | 0