채택된 답변

Jon
Jon 2020년 11월 10일
편집: Jon 2020년 11월 10일

0 개 추천

You must first make a matlab function or script to evaluate your y(x) and then plot your values
So something like
% define constants (put your values here)
a =
b =
x = linspace(0,10) % makes x values
y = zeros(size(x)) % preallocate y value
% loop to evaluate y
for k = 1:length(x)
if x(k) > b + a
y(k) = 1
elseif x(k) >= b - a
% and so on
end
end
% finally plot your values
plot(x,y)

댓글 수: 1

Jon
Jon 2020년 11월 10일
편집: Jon 2020년 11월 10일
If you are not familiar with how to code in MATLAB please complete the MATLAB On Ramp training, https://www.mathworks.com/learn/tutorials/matlab-onramp.html then make an attempt to write your code and you can get lots of help here (MATLAB Answers) with your specific coding questions

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Graphics Performance에 대해 자세히 알아보기

제품

태그

질문:

2020년 11월 10일

편집:

Jon
2020년 11월 10일

Community Treasure Hunt

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

Start Hunting!

Translated by