Best way to write some equations and generate a graph

[EDIT: 20110601 11:35 CDT - reformat - WDR]
I have equations that feed into each other that are written into functions. What is the best way to execute all of them in one fell swoop and generate some graphs?
Ex:
where t1,t2,t3,t4 are all arrays of values:
x = {(t2[n] - t1[n]) + (t4[n] - t3[n])}/2
y = (t2[n]-t1[n]) - x
z = {(t2[n+1] - t2[n] + y/alpha)/(t1[n+1] - t1[n])} - 1
say I now want to graph values of x vs. z, what is the best way to do this?
Thanks!

Antworten (1)

Matt Fig
Matt Fig am 1 Jun. 2011
Is n a scalar, or is it supposed to be in a loop? If it is loop index, what is the range?
x = {(t2(n)-t1(n)) + (t4(n)-t3(n))}/2
z = {(t2(n+1)-t2(n) + ((t2(n)-t1(n))-x)/alpha)/(t1(n+1)-t1(n))} - 1

Kategorien

Mehr zu Get Started with Signal Processing Toolbox finden Sie in Hilfe-Center und File Exchange

Tags

Gefragt:

Ren
am 1 Jun. 2011

Community Treasure Hunt

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

Start Hunting!

Translated by