How to create symbol function matrix in matlab?
Mostrar comentarios más antiguos
I need to solve a linear differential equations, such as diff(Y) = AY, Y(0) = Y0. Y \in R^n; So I need to generate a column of symbol function. I used the following code
clc;clear;
n = 7;
syms t V;
A = sym('A', [n 1]);
U = symfun(A,[t]);
However, as the result shows, the size of U is 1 by 1. I don't know what is wrong and how I can make it work.
I will appreciate your help a lot. Best,
Respuesta aceptada
Más respuestas (1)
Andrew Newell
el 8 de Dic. de 2014
To get an n x n matrix, use
A = sym('A',n);
1 comentario
Chuangchuang Sun
el 8 de Dic. de 2014
Categorías
Más información sobre Symbolic Math Toolbox en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!