필터 지우기
필터 지우기

problems with my contour plot

조회 수: 1 (최근 30일)
Luke Radcliff
Luke Radcliff 2017년 2월 2일
답변: Walter Roberson 2017년 2월 2일
my second contour plot with time, is not starting to plot at (0,0), which it's supposed to. Not sure why
m = 8;
ft = 40;
b = linspace(20,200,10);
k = linspace(20,200,10);
for j = 1:length(b)
for i = 1:length(b)
b1 = b(j);
k1 = k(i);
G = tf([1],[m b1 k1]);
sys = ft*G;
[y,t] = impulse(sys);
disp(j,i) = max(y);
time(j,i) = max(t);
end
end
figure(1)
contourf(k,b,disp)
figure(2)
contourf(k,b,time)

답변 (1개)

Walter Roberson
Walter Roberson 2017년 2월 2일
Your k and b start at 20, so you do not have data for 0, 0. You could force the plot to start at 0, 0:
xlim([0 200]);ylim([0 200])

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by