Respondida
Help with my SIR MODEL
@Darren Tharby I think you did intend to call sirs_model(), from the File Exchange, since the seven variables which you pass ar...

casi 5 años hace | 0

Respondida
Help with my SIR MODEL
@Darren Tharby, You get an error at lline 13 because line 13 (which is in function sir_model()) calls itself. That is not OK. ...

casi 5 años hace | 0

Respondida
How to maintain tank water level in Matlab
@Anass Naoushy, The figures show simulaitons of responses to step changes in F1 and in F4. The attached code is for the seocnd...

casi 5 años hace | 0

| aceptada

Respondida
Can anybody suggest me to draw a more meaningful histogram? Or how can I get the opposite histogram of this bar plot?
@Sk. Alam, I still do not understand what you want to do. You said you are plotting the histograms, and that you want to get ...

casi 5 años hace | 0

Respondida
Can anybody suggest me to draw a more meaningful histogram? Or how can I get the opposite histogram of this bar plot?
@Sk. Alam, When I run your code I get the plot below. The triples of adjcent bars are hard to discern or appreciate. The x-xis...

casi 5 años hace | 0

| aceptada

Respondida
How to plot histogram of a given pdf
@Sudhir Sahoo, Here is a script that evaluates the density. Are there restrictions on what the allowed values are for m? You...

casi 5 años hace | 0

| aceptada

Respondida
What is the reference magnitude/amplitude for calculating dB in the power colorbar using STFT?
@Jan Ali, The values plotted on the spectrogram are the power spectral density. The p.s.d. is a way of normalizing a power spe...

casi 5 años hace | 3

| aceptada

Respondida
What is the reference magnitude/amplitude for calculating dB in the power colorbar using STFT?
The reference for the dB calculation is a signal whose rms amplitude and power are unity.

casi 5 años hace | 1

Respondida
How to code for this equation based on euler's, Huen's and 4th order Range Kutta method of ODE on MATLAB. Please Help.
@Anil Maddipatla, You're welcome. To plot all three solutions on one plot, I recommend that you name the solutions c1, c2, c3 ...

casi 5 años hace | 0

Respondida
calculate distance with latitude and longitude
@ELISABETTA BILLOTTA I assume you know the standard formula for distance betwen two points whose longitudes () and latitudes ()...

casi 5 años hace | 0

| aceptada

Respondida
How to code for this equation based on euler's, Huen's and 4th order Range Kutta method of ODE on MATLAB. Please Help.
@Anil Maddipatla, What have you tried so far, and what errors do you get? The three methods you have cited are for solving a d...

casi 5 años hace | 0

| aceptada

Respondida
ode 45 doesnt work
@Naor t, It doesn;t work because you define y0=[-1 8], a vector with 2 elements. Therefore ode45() gets into trouble when it tr...

casi 5 años hace | 1

| aceptada

Respondida
How can I write a custom complex mathematical expression?
@KUMAR TRIPATHY, I recommend that you read the Matlab help on writing functions. Here is an example of how you can create the ...

casi 5 años hace | 1

Respondida
How to make weighted random sampling for matrix
@Michele Pio Papasidero, Function x=weightedRandomSample(v,p), attached, does what you have requested. It returns a random samp...

casi 5 años hace | 1

Respondida
Curve Fitting an equation
@Arjun Siddharth, EI appears as a constant factor in the denominator of eq. 16 for . Therefore if you use a different value of ...

casi 5 años hace | 0

| aceptada

Respondida
Error message odearguments(FcnHandlesUsed, solver_name, ode, tspan, y0, options, varargin);
@Chris Li, Your function myode() returns 4 quantities: dydt, NA, NB, and Ff. function [dydt, NA, NB, Ff] = myode(t, y, n) I'm...

casi 5 años hace | 0

Respondida
Probability vector from a Markov Transition Matrix
@Daniel Caballero, I used the code and ideas I posted in the earlier answer, with appropriate constants for your particular mode...

casi 5 años hace | 0

| aceptada

Respondida
Wind rose - collateral points, continuous circle at 50% and the percentages on a line (west to center)
@Jacqueline Rigatto, That's 400 lines of code! Check out https://www.mathworks.com/matlabcentral/fileexchange/47248-wind-rose ...

casi 5 años hace | 0

Respondida
Finding a parameters of nonlinear equations
@Adel Khaled, I would do this analytically, at least for a while. SOme of your posting was cut off on th left edge, but here's ...

casi 5 años hace | 0

Respondida
ode23, ode45 acting weird - why?
@David Goodmanson, Thank you for your thoughts and for running the code. I am glad to know that you got similar results. As fo...

casi 5 años hace | 0

Respondida
Data fitting with custom equation
@Somnath Kale, fmincon() is a very good general purpose routine to find the parameters that give a good fit to your data. Read...

casi 5 años hace | 0

| aceptada

Respondida
2nd order differential errors
@John Masters, Are you getting an error message? If so, what? I notice that your dydt is mising a "*" after C.

casi 5 años hace | 0

Respondida
Step Function for Checking if Point is inside Spherocylinder
@Mari Teli, I do not understand what spherocylinder() is supposed to do, because your question does not seem to match the output...

casi 5 años hace | 0

Respondida
set extrapolation to connect last point values to the first (extrapolated) ones with interp1
@gabriele fadanelli, Since you know your function is periodic with period 365, add a new last point to x() and to y(). The new ...

casi 5 años hace | 0

Respondida
Factorial(1000) as number
@Khannanov Shamil, You want to calculate n! ~ sqrt(2*pi*n) * (n/e)^n (Stirling's approximation) but it is too big when n>170...

casi 5 años hace | 1

Respondida
Factorial(1000) as number
@Khannanov Shamil, I agree with the suggesiton to use Sritlin's approximation and just report the log of the factorial: where...

casi 5 años hace | 0

Pregunta


ode23, ode45 acting weird - why?
I am integrating a pair of simple non-stiff first order differential equations. The output, using ode45(), is as expected, when...

casi 5 años hace | 2 respuestas | 0

2

respuestas

Respondida
Error using odearguments (line 113) Inputs must be floats, namely single or double.
@Quanshun An, I recommend that you remove the syms command at the top of your code. You have defined a bunch of constants in t...

casi 5 años hace | 0

Respondida
use fitdist() to fit normal distribution with GIVEN MEANS.
@gabriele fadanelli, If the mean is known in advance, then the maximum likelihood estimator for is which is easy to calcul...

casi 5 años hace | 1

| aceptada

Respondida
Problem with time span when integrating with ODE45
@Samuele Bolotta, I think it would be easier to understand your issue if you show your main program that calls ode45(). YOu wa...

casi 5 años hace | 1

| aceptada

Cargar más