Arraywise operators in Symbolic expressions
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Matlab's symbolic toolbox omits the dot notations in sym classes. Example: >>syms x >>F=x.^2 >>F=x^2
I also tried arraywise power function (power(x,2)) and other arithmetic operators and result is the same. The '.' vanishes from the equation. I got a dynamically changing equation which needs to be expressed symbolically.This is a problem because when i pass this symbolic equation to other functions (properly), i got an error because they try to evaluate the variables in my function as matrix. So how can i solve this problem or work around of it?
0 Kommentare
Akzeptierte Antwort
Andrei Bobrov
am 15 Apr. 2011
variant
syms x y z
F = vectorize(x^2+y^3-1/z);
or
syms x y z
F = x.^2+y.^3-1./z;
F = vectorize(F);
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!