write variable in symbolic way

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

回答 (1 件)

Conrad
Conrad 2012 年 11 月 5 日

0 投票

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

カテゴリ

ヘルプ センター および File ExchangeSymbolic Math Toolbox についてさらに検索

タグ

質問済み:

2012 年 11 月 5 日

Community Treasure Hunt

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

Start Hunting!

Translated by