**Statistics**

RANK**365**

of 247,043

REPUTATION**178**

CONTRIBUTIONS

**0** Questions

**99** Answers

ANSWER ACCEPTANCE **
0.00%
**

VOTES RECEIVED**23**

RANK

of 17,225

REPUTATION**N/A**

AVERAGE RATING**0.00**

CONTRIBUTIONS**0** Files

DOWNLOADS **0**

ALL TIME DOWNLOADS**0**

CONTRIBUTIONS**0 Posts**

CONTRIBUTIONS**0** Public Channels

AVERAGE RATING

CONTRIBUTIONS**0** Highlights

AVERAGE NO. OF LIKES

**Content Feed**

How to solve two differential equations using ode45.

Hi Ebraheem Is there anything specific that you want me to do for you?

1 year ago | 0

why step size is divided by 50?

HI SK, Let say you have a function f (t) and you want to plot it between t = Tmin and Tmax, in matlab, you have to choose a ...

3 years ago | 0

| accepted

how to solve an exponential equation with one unknown in matlab

Try the following code which uses Newton's method to find the root of the f(x) = 0. close all; clc; N = 50; ra = 9...

3 years ago | 0

| accepted

Help with Coding problem

Try this function [J] = funtc(x_t,c,theta,M,N,L) J = zeros(1,L); for t = 1:L xs = 0 ; xp = 0 ; ...

3 years ago | 0

how to plot fourier series in matlab

<</matlabcentral/answers/uploaded_files/121573/F-series.PNG>> Here is what your Fourirer series would like if my calculations...

3 years ago | 2

I want to write a function that takes the output of one function and puts it into another. I am using the potential energy calculation of one equation and putting it into the kinetic energy of another but I am getting errors. I also need to plot it.

Here are simplified versions of your functions. function Ep = energy(k,x) % Calculates the potential energy ...

3 years ago | 0

| accepted

Question on heat equation 1D Forward in Time Centered in Space

Here is an updated version of the code. I also used matlab pdepe function to validate the results which seem to agree with one a...

3 years ago | 1

| accepted

I want to write a function that takes the output of one function and puts it into another. I am using the potential energy calculation of one equation and putting it into the kinetic energy of another but I am getting errors. I also need to plot it.

Are you trying to solve the equation Ep = Ek? Where Ep = mgh as the potential energy and Ek = 1/2mv^2 as kinetic energy. I see ...

3 years ago | 0

How to plot discrete signals (delta equation)

Take a look at this code. It shows how to plot the sequences that you are given. n0 = 0; n1 = 1; n2 = -4; n = -5:5...

3 years ago | 1

using ODE45 to solve simultaneously independent ODE's vs. calling the function twice - different results...

Answers have been inserted into your codes (I just modified them a bit). function Plot_odes T = 10; N = 1000; ...

3 years ago | 0

Creating discrete-time model

Use this line of code to get a negative exponent. H = tf(P,Q,0.1,'variable','z^-1');

3 years ago | 0

| accepted

Solving System Algebraic and Differential Equation

Here is a code that may help you get started. function First_oder_ode % Verify that your equations are implemented c...

3 years ago | 0

| accepted

define a piecewise function whose parameters change on each segment

Check this link. It provides a vectorized method of implementing a piecewise function. <https://www.mathworks.com/matlabcentra...

3 years ago | 0

How to write a sigma calculation

In part two of the problem, you will have to use the definition of the DTFT to compute X(omega). The resultant function is just ...

3 years ago | 0

| accepted

How to plot the log to base 10 of absolute value of a function containing Sigma (Σ)

Try this code, it might help. clear all close all Nt = 100; Nx = 150; L = 2; a = .5; t = 0:4/(Nt-1):4; ...

3 years ago | 0

| accepted

How to plot function from m file with vectors

If x is a vector (1×N), then F must be a function of x, write F = x.^2 in this case. Else if x is a matrix (2×N) containing tw...

3 years ago | 0

Solve a system of Differential Equations with a piecewise function

Thanks for clearly formulating your problem;this is what drew my attention. It is very difficult to find a well stated problem a...

3 years ago | 2

| accepted

Problem with graph MATLAB

Your code seems to be right, but the for loop is really not suitable in this case. However, there is a slight variation in the r...

3 years ago | 1

| accepted

FFT implementation by myselft

It would be more efficient to use a vector form of the DFT for the coding in matlab. As an example, see below. Note that this m...

3 years ago | 1

| accepted

Trying to write an ODE solver using Backward Euler with Newton-Raphson method

Here are two methods that you can use to code Euler backward formula. %% Method 1 clear variables close all a ...

3 years ago | 0

Trying to write an ODE solver using Backward Euler with Newton-Raphson method

Alternatively, you can write a function. function [t,yb,h] = backwardEuler(a,b,N,M,y0,f,fx) h = (b-a)/N; t ...

3 years ago | 0

| accepted

How to solve non linear second order differential equation with split boundary conditions?

Which method are you using to solve this problem? Are you using ode45, Runge kutta, or some other method like the finite differe...

3 years ago | 0

Trying to write an ODE solver using Backward Euler with Newton-Raphson method

I would recommend you writing another function that does the differentiation separately. It would even be best if the function t...

3 years ago | 0

I am doing runge kutta order 4 for a system of equations.Any bugs that giving me x1 and x2 =0 for all 200 values?

See this link, it might be helpful. <https://www.mathworks.com/matlabcentral/answers/386695-how-to-solve-this#answer_308949>

3 years ago | 0

How to solve this?

function [t,x,y,N] = Runge4_2eqs(f1,f2,to,tfinal,xo,yo,h) N = ceil((tfinal-to)/h); x = zeros(1,N); ...

3 years ago | 0

| accepted

Anyone knows why this keeps running forever

It would be much better to use a single for loop to implement this function. The two while loops and the if statement do not see...

3 years ago | 0

Matrices in ODE function

I find it a bit odd to follow your system of equations, your derivities are given in x1, x2, and x3 and you are trying to find y...

3 years ago | 0

Solving nonlinear 2nd order differential equation with signum using ODE solvers?

Hi Jimmy, here is my version of the solution, see if it matches what you are expecting. The values that you choose for m, r and...

3 years ago | 0

Can someone please help me(provide me) with Bilinear LMS algo along with MATLAB code?

Here is the code. function [e,A,B,C,Wa,Wb,Wc,ya,yb,yc] = BilinearLMS(x,y,d,mua,mub,muc,M1,M2) ...

3 years ago | 0

how to compute average power of the generated sinusoidal signal?

Are you saying that px = 1/(2×N+1)[(Acos(wt))^2 + (Acos (2wt))^2 +... (Acos(N*wt))^2] should equal a single number? How possible...

3 years ago | 0