For loop with symbolic expressions
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
rodrigo
am 10 Okt. 2013
Beantwortet: Walter Roberson
am 10 Okt. 2013
I am trying to make a for loop that put symbolic expressions inside a matrix ( in positions given by index of for loop) and i get this error:
??? The following error occurred converting from sym to double:
Error using ==> mupadmex
Error in MuPAD command: DOUBLE cannot convert the input expression into a double array.
If the input expression contains a symbolic variable, use the VPA function instead.
Can you help me ?
Thanks in advance,
2 Kommentare
Akzeptierte Antwort
Walter Roberson
am 10 Okt. 2013
Do not initialize the matrix to zeros(): that requires numeric values instead of symbolic.
Try
matriz_N = sym(zeros(3, 6+4*k));
0 Kommentare
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!