write variable in symbolic way

조회 수: 1 (최근 30일)
Nello Troccia
Nello Troccia 2012년 11월 5일
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일
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...

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by