Subs command substituting the values of variables that was earlier define symbolic but when I am using plot command error message came "Non numeric data"
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I have the expression det k in symbolic bc and kh.
detk= k31*k22-k32*k21
bc is replaced by om/kh, om is symbolic too
val=subs(detk,{bc,kh},{om/kh,kh})
der=-diff(val,kh)/diff(val,om)
mega=ub*nb % ub=2, nb=1
xx=subs(der,[om,kh],[mega,nb])
wnen code is running, expression of xx comes but not in simplified form. It contains operators *, /, sinh, cosh etc. and wnen I am trying to plot it error message came that non numeric data and plot is not supported.
plot(kh,xx)
Error using plot
Non-numeric data is not supported in 'Line'
Error in cal (line 233)
plot(kh,xx)
2 Commenti
Stephen23
il 21 Gen 2022
Modificato: Stephen23
il 21 Gen 2022
After SUBS call DOUBLE: https://www.mathworks.com/help/symbolic/double.html
The Symbolic Toolbox documentation has an entire section of the function list entitled "Conversion Between Symbolic and Numeric": https://www.mathworks.com/help/symbolic/referencelist.html?type=function
Risposta accettata
KSSV
il 21 Gen 2022
Convert the symbolic class into double using the function double. Read about it.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Symbolic Math Toolbox in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!