Réponse apportée
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...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 3 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 3 ans il y a | 0

Réponse apportée
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...

plus de 3 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 3 ans il y a | 0

Réponse apportée
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 = ...

plus de 3 ans il y a | 0

Réponse apportée
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 ...

plus de 3 ans il y a | 0

Réponse apportée
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...

plus de 3 ans il y a | 0

Réponse apportée
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...

plus de 3 ans il y a | 0

Réponse apportée
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...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 3 ans il y a | 0

Réponse apportée
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...

plus de 3 ans il y a | 0

Réponse apportée
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'...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 3 ans il y a | 0

Réponse apportée
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(:)...

plus de 3 ans il y a | 0

Réponse apportée
variable number of if condition
Maybe something like this: for i = min:max %:columns b = 1; d = 1; f = 1; for a = 1:length(Ex) for i_c...

plus de 3 ans il y a | 0

Réponse apportée
Why does this code generate a mix of integers and doubles?
In practice you can look on this problem as "good luck" and "bad luck" when it comes to working and not working. The rounding of...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Remove noise from the image
First start by trying standard filtering-methods. Compare what you get with 2-D median-filter (medfilt2), and Lee's sigma-filter...

plus de 3 ans il y a | 0

Réponse apportée
Function GUNZIP was unable to read URL ''http://opihi.cs.uvic.ca/sound/genres.tar.gz''.
If the file doesn't exist then nothing will be able to read it. I wouldn't bother using gunzip, I'd go for straight downloading ...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
True north-based azimuths
Your question doesn't make much sense, sure you can do that - but that would be more of "establishing" your azimuth-convention. ...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Incorrect dimensions for raising a matrix to a power
Just set a debug-stop in that function and check what dimensions your variables have: dbstop in gaussh Or just at the point wh...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Filtering the large precipitation data for finding rainfall events
If you store your rain-fall-data in an array, r_f for rain_falls, with n_t rows and n_stations columns you could easily do thing...

plus de 3 ans il y a | 1

| A accepté

Réponse apportée
How to fit regression
This is not a polynomial, therefore you cannot use polyfit. You can seamlessly use any least-square fitting routine to fit your ...

plus de 3 ans il y a | 0

Réponse apportée
curve of best fit
In order to get a function that has two y-values for for some range of x-values you will cannot fit a polynomial such that y=p(x...

plus de 3 ans il y a | 1

| A accepté

Réponse apportée
how can compute a marginal distribution?
Look at the help and documentation for the histogram-function. Possibly also check the histogram2. HTH

plus de 3 ans il y a | 0

Réponse apportée
Solving a system of linear equations with lots of o coefficients.
Matlab is designed to solve systems of linear equations. It is one of the fundamental operators of its matrix-algebra: % Your p...

plus de 3 ans il y a | 0

Réponse apportée
Reading and analysing files in subfolders - indexing
Why not skip the generation of FileName and index into files directly inside the loop: dt = 0.005; tt = 0:dt:60; files = dir(...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Trajectorys of 4 objects on 3D plane not symmetrical
Your main problem (or rather: step to take) is that you do the calculations element-by-element in the different arrays. That is ...

plus de 3 ans il y a | 0

| A accepté

Charger plus