简体   繁体   中英

Matlab Syntax for Symbolic Solving

I have a symbolic equation equation like

i = 1:n (i=1...n) it takes random values.

G_i = B_i + C_i * D_i and I have B_i, G_i C_i and D_i equaling to some constraints.

I have to simplify a such equation through matlab.

I used 'syms' to define each symbol but I don't know how to define that 'i' indices.

Also, my second question is if I want to change it to summation format (symsum) where i=1...n how can I write the code for to simplify given some constraints. Any example can be useful for me to understand.

What you want to do is create an array of symbolic values: Matlab docs show how to do this for A, I'll leave it up to you to do the rest.

A = sym('A',dim)

Then you could do something like:

G(i)=b(i)+c(i)*d(i)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM