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

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

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

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

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

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

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

4 Monate 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(...

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

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

4 Monate 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'],...

4 Monate 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

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

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

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

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

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

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

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

4 Monate ago | 0

| accepted

Answered
Double parameter optimisation using optimisation toolbox
The standard fitting method I use is: % Your curve-function definition (I just mock one up, if you have it defined in a % mat...

4 Monate ago | 0

Answered
legend for multiple plots
Use the outputs from plot to explicitly control what is show in the legend: x=1:15 ph1 = plot(x,res540,'-r'); hold on ph2 = ...

4 Monate ago | 0

Answered
The contour function requires Z=f(x,y); I have measured data for X,Y, and Z that are not related with a function. I get errors when I use Z as a X:1 array
You will have to look at the scatteredInterpolant or TriScatteredInterp and possibly also its related griddata functions, check ...

4 Monate ago | 0

Answered
ismember(a, b) function problem
The ismember function checks if elements in a are found in b, not that each element match. In your case both "1" in a have a val...

4 Monate ago | 0

Answered
Generate nchoosek vectors line-by-line
There are loads of nchoosek functions available on the file exchange: nchoosek. Some of those should help you with this. I recal...

4 Monate ago | 0

Answered
Parameter Estimates for Ordinary Differential Equation
Solve the ODE analytically. That will give you an expression for T(t,c1) this you can then use for a standart non-linear least-s...

4 Monate ago | 0

| accepted

Answered
3D Polar Plot
A quick search on the file exchange leads to these submissions:pcolor-in-polar-coordinates, 3d-polar-plot and polar-contour-plot...

4 Monate ago | 0

Answered
Struggling trying to create a 2-D contour plot from a large data set from x and y coordinates and corresponding frequency value
Wouldn't something like this do: % Mock-up of data similar to yours... x = linspace(-5,5,501); y0 = linspace(-2,2,201); [x,y...

4 Monate ago | 0

Answered
Add legend for a specific plot
Explicitly use the handles returned from the plotting-functions: legend([l1(:);l2(:);l3(:)],'text1_1','text1_2','and','so','on'...

4 Monate ago | 0

| accepted

Answered
Solve differential equation from Matlab
For a numerical integration of this ODE look at the help and documentation for ode45 and its siblings, also look at the examples...

4 Monate ago | 0

Answered
How to smoothen contourf plot to make it look better
Best way (probably) to go about making your contourlines smoother is to interpolate your data: Xi = linspace(min(X(:)),max(X(:)...

4 Monate ago | 0

Load more