Plotting y = kx
이전 댓글 표시
I am trying to reproduce the following graph, which is a plot of some function like: y = kx, with both varying 'k' and 'x'. Can someone help me in this?
댓글 수: 2
Walter Roberson
2020년 10월 5일
Can you do it parametrically, k = K(t), x = X(t), hence y = K(t).*X(t) ?
Behnaz Seyedahmadi
2020년 10월 5일
답변 (2개)
Walter Roberson
2020년 10월 5일
N = 150;
kvec = linspace(0, 1000, N);
xvec = linspace(0, 20225, N);
[k, y] = meshgrid(kvec, xvec);
y = k .* x;
nlevels = 50;
contour(k, y, nlevels)
Sulaymon Eshkabilov
2020년 10월 5일
k=1:999;
x =1:2024;
F = k.* x(:);
N = 25;
contour(k, x, F, N), shg
xlabel('k stifness'), ylael(' ...')
카테고리
도움말 센터 및 File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!