I am trying to plot a matlab function with 2 variables. I want to fix one variable and provide a definite range for other variable. Let me know how do I achieve this.
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
khu
el 18 de Mayo de 2016
Comentada: khu
el 18 de Mayo de 2016
I am trying to plot a matlab function with 2 variables. I want to fix one variable and provide a definite range for other variable. Let me know how do I achieve this.
0 comentarios
Respuesta aceptada
Walter Roberson
el 18 de Mayo de 2016
Example:
f = @(x,y) sin(x.^2 + y.^2 - x*y); %a function of 2 variables
fixed_x = pi/9;
newf = @(y) f(fixed_x, y);
Now you can, for example,
ezplot(newf, [-20, 15])
Más respuestas (0)
Ver también
Categorías
Más información sobre Whos 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!