필터 지우기
필터 지우기

plotting all indices in a for loop

조회 수: 1 (최근 30일)
shobhit mehrotra
shobhit mehrotra 2014년 9월 4일
답변: Star Strider 2014년 9월 4일
i have this code
for n=1:35
A = sin(n*3)
B= cos(n^2)*3))
plot (A,B)
end
however when i plot it only plots the last point, how can i plot all of the points in the array?

채택된 답변

Star Strider
Star Strider 2014년 9월 4일
This should work:
for n=1:35
A(n) = sin(n*3)
B(n) = cos(n^2)*3))
plot (A,B)
end

추가 답변 (0개)

카테고리

Help CenterFile 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!

Translated by