필터 지우기
필터 지우기

Why won't my plot line show in plot?

조회 수: 2 (최근 30일)
wobbly
wobbly 2021년 12월 2일
답변: Chunru 2021년 12월 2일
Only a blank graph is showing up with no line.
for n_c = linspace(0.6,0.8,10)
W_eff = W_dot_net*(n_c)
end
plot(n_c,W_eff,'c-','MarkerSize',10)
axis auto
  댓글 수: 2
wobbly
wobbly 2021년 12월 2일
W_dot_net is a constant
Walter Roberson
Walter Roberson 2021년 12월 2일
https://www.mathworks.com/matlabcentral/answers/1600965-why-won-t-my-plot-graph-a-line#answer_845460
to start

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

답변 (1개)

Chunru
Chunru 2021년 12월 2일
W_dot_net = 3; % a constant
n_c = linspace(0.6,0.8,10);
% The following can be vectorized and simplified. But the loop form helps
% to understand the concept.
W_eff = zeros(size(n_c));
for i=1:numel(n_c)
W_eff(i) = W_dot_net*n_c(i);
end
plot(n_c,W_eff,'c-','MarkerSize',10)
axis auto

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by