plot with input arguments

조회 수: 1 (최근 30일)
Roger Nadal
Roger Nadal 2019년 12월 5일
댓글: Roger Nadal 2019년 12월 11일
i want to subplot 4 string containg cell array from ( sin, cos, tan,sinh) and vector (+,o,*,x,s) and the mathmatical function should be ploted in interval (-2pi,2pi)with step 0.3

채택된 답변

Walter Roberson
Walter Roberson 2019년 12월 5일
funs_cell = {'sin', 'cos', 'tan', 'sinh'};
markers = {'+', 'o', '*', 'x', 's'};
funs = cellfun(@str2fun, funs_cell, 'uniform', 0);
for K = 1 : length(funs)
plot(x, funs{K}(x), markers{K}, 'DisplayName', funs_cell{K});
hold on
end
  댓글 수: 33
Roger Nadal
Roger Nadal 2019년 12월 11일
Thank you
Roger Nadal
Roger Nadal 2019년 12월 11일
If I don’t want to generate random order for then should I remove randperm?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by