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 (최근 30일)
이전 댓글 표시
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
채택된 답변
Walter Roberson
2016년 5월 18일
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])
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Whos에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!