How to pass values to a vector inside an anonymous function for ezplot?
조회 수: 2 (최근 30일)
이전 댓글 표시
I wonder how can I benefit from passing additional parameter for ezplot function.
I'm trying to plot implicit function that has a vector th inside which has the problem.
Here is the code:
delta = pi*[1 2 3];
m = 1:100;
th{1,1}(1:100) = 2*pi*m*delta(1);
th{2,1}(1:100) = 2*pi*m*delta(2);
th{3,1}(1:100) = 2*pi*m*delta(3);
myfun = @(x,y,k) x + y.*th{k,1}(1:100) + k;
for k = 1:3
ezplot(@(x,y)myfun(x,y,k));
hold on
end
댓글 수: 10
Guillaume
2017년 3월 6일
I understand everything you wrote except the I would like to "sort of" convert this vector into a just symbolic 1x1 that ezplot output can produce. It doesn't sound that you actually know what you want.
ezplot plots where myfun(x, y) == 0. What does equal to 0 mean when myfun(x, y) is a vector of 100 values? Do you want the zeros of the function
f(x, y) = x + a*y + k
for 100 different scalar a and 3 different scalar k, resulting in 300 plots?
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Graphics Performance에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!