the fsurf produce incorrect plotting?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Chuliang Fu
el 27 de Sept. de 2019
Editada: Asvin Kumar
el 1 de Oct. de 2019
Hi,
When I use [syms]+[fsurf]
it seems not produce correct answer:
syms T P
G=T*log(P);
fsurf(G,[298 500 10^(-10) 10])
it can be easily checked that it doesn't produce correct plotting by any analytical calculation
So why is that?
0 comentarios
Respuesta aceptada
Asvin Kumar
el 30 de Sept. de 2019
Editada: Asvin Kumar
el 1 de Oct. de 2019
The output by fsurf in the example given is being plotted for P in the range of 298 – 500 and T in the range of 10^(-10) – 10. This behaviour is observed because fsurf maps the values in the xyinterval argument to the symbolic variables in G as listed in:
symvar(G)
One simple workaround for this would be to replace [298 500 10^(-10) 10] with [10^(-10) 10 298 500].
Another approach would be to use symfun as follows:
syms T P
G= symfun(T*log(P),[T P]);
fsurf(G,[298 500 10^(-10) 10]);
For more details have a look at:
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Conversion Between Symbolic and Numeric en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!