Hi
I want to plot a dsolve's result but I don't know how i can replace values in equation. would you please help me?
clear all;
syms T(x) k q a l x
k=60.5;
q=1000;
a=373;
l=0.5;
DT=diff(T);
D2T=diff(T,2);
T(x)= dsolve('D2T==-q/k','T(-l)==a','T(l)==a','x')
x=-0.5:0.01:0.5;
plot(x,T(x),'*','color','r','linewidth',3)
Error using plot
Data must be numeric, datetime, duration or an array convertible to double.

 Respuesta aceptada

Star Strider
Star Strider el 18 de Jun. de 2020
Use the fplot function instead:
syms T(x) k q a l x
k=60.5;
q=1000;
a=373;
l=0.5;
DT=diff(T);
D2T=diff(T,2);
T(x)= dsolve(D2T==-q/k,T(-l)==a,T(l)==a);
figure
hfp = fplot(T, [-0.5 0.5]);
hfp.Marker = '*';
hfp.LineWidth = 3;
hfp.Color = 'r';
grid
.

2 comentarios

shaqayeq qazayi
shaqayeq qazayi el 18 de Jun. de 2020
Thank you so much
It works
Star Strider
Star Strider el 18 de Jun. de 2020
As always, my pleasure!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Control System Toolbox en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 18 de Jun. de 2020

Comentada:

el 18 de Jun. de 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by