Im getting a blank graph, and alot of errors.
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
John
el 10 de Mzo. de 2023
Comentada: Star Strider
el 10 de Mzo. de 2023
x = inline ('t>0', 't');
t1 = -2;
t2 = 6;
t = [t1, t2];
fplot (x, t)
0 comentarios
Respuesta aceptada
Star Strider
el 10 de Mzo. de 2023
Use an anonymous function instead of the deprecated inline function, and since the ‘x’ function actually returns a logical result, convert it to a numerical result by performing an arithmetic operation on it, here being a unary plus —
x = @(t) +t>0;
t1 = -2;
t2 = 6;
t = [t1, t2];
fplot (x, t)
xlabel('t')
ylabel('x')
... and the plot of the function magically appears!
.
2 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Graph and Network Algorithms 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!

