Answered
Multiplying from a loop
@Michael Akiva, Here is code that adjusts r at the frequencies near each pole pair, until -0.9<=H(w)<=-1.0. Since there are th...

2 months ago | 0

Answered
Multiplying from a loop
@Michael Akiva, Get rid of the loop for n=[1:3] ... end but keep the code inside the loop, and define all 6 zeros a...

2 months ago | 0

| accepted

Answered
How can I measure the area covered by a Bar Chart Plot?
@Tawsif Mostafiz, If you make a histogram using Matlab's histogram command, for example as follows, data=randn(1,1000); h=his...

2 months ago | 0

Answered
Can you help me how to move forward
@kraken, Now for the answers to your specific quesitons: gdel=grpdelay(dee); returns the group delay at 512 points from frequ...

2 months ago | 0

Answered
Can you help me how to move forward
@kraken, next part of my answer: Your plot 1 uses ylabel('x'); xlabel('t'); but the correct labels should be ylabel('|X(...

2 months ago | 0

Answered
Can you help me how to move forward
@krakenThe code you provided runs - good. Are you aware that, because of how you constructed t, the sampling rate in t does not...

2 months ago | 0

Answered
Filter function in MATLAB
@Mohammad Zulqarnain, @Jan is right, as usual. I really like filtfilt() because it has zero phase lag at all frequencies. fil...

2 months ago | 1

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

3 months ago | 0

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

3 months ago | 0

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

3 months ago | 0

| accepted

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

3 months ago | 0

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

3 months ago | 0

| accepted

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

3 months ago | 0

| accepted

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

3 months ago | 2

| accepted

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

3 months ago | 1

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

3 months ago | 0

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

3 months ago | 0

| accepted

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

3 months ago | 0

| accepted

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

3 months ago | 1

| accepted

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

3 months ago | 0

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

3 months ago | 0

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

3 months ago | 0

| accepted

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

3 months ago | 0

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

3 months ago | 0

| accepted

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

3 months ago | 0

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

3 months ago | 0

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

3 months ago | 0

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

3 months ago | 0

| accepted

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

3 months ago | 0

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

3 months ago | 0