write variable in symbolic way

1 Ansicht (letzte 30 Tage)
Nello Troccia
Nello Troccia am 5 Nov. 2012
I have to write a system of equation with a lot of variable. Some of this are a little bit difficult to write and to read. Is there a method to indicate a variable in a symbolic way.
For example: is there a method to indicate the variable
x(i+3*g)/(x(i+4*g)+x(i+5*g))
by the letter A(i) ???
Thanks

Antworten (1)

Conrad
Conrad am 5 Nov. 2012
Try this:
g = 1;
x = ones(1,10);
A = @(i) x(i+3*g)/(x(i+4*g)+x(i+5*g));
You can then use A(1) etc...

Kategorien

Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by