Azzera filtri
Azzera filtri

Code for a delay difference equation

1 visualizzazione (ultimi 30 giorni)
Sk. Sarif Hassan
Sk. Sarif Hassan il 27 Mar 2015
Here is the difference equation:
x_{n+1}=[p*x_{n-l}+x_{n-k}]/[q+x_{n-k}]
Can anyone help me to code it to get the sequence with corresponding plots. Here p, q, and l, k are all positive integers. and l is different from k.
I tried as follows:
p=randi([0,100]);
q=randi([0,100]);
l=randi([0,100]);
k=randi([0,100]);
z0=randi([0,100]);
z1=randi([0,100]);
s=5000;
for n=1:s
Z=Unable to define;
z0=z1;
z1=Z;
Zarray(n)=Z;
end
end

Risposte (0)

Categorie

Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange

Tag

Non è stata ancora inserito alcun tag.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by