Just making sure my 3dplot is as the question is asking

Problem: Use the plot3 command to create a 3D plot for the following function: d = 0 to 10*pi (with increment of 1) Plot sin(d) and cos(d) as the independent variables and z as the dependent variable. z=sin(d)*cos(d) Label each axis and give a title to the whole graph.
My code: format short
d = [0:1:(10*pi)];
z = sin(d).*cos(d);
a = sin(d);
b = cos(d);
plot3(a,b,z)
title('3d Plot of d(0to10pi inc of 1) vs sin(d) and cos(d)')
xlabel('sin(d)')
ylabel('cos(d)')
zlabel('sin(d)*cos(d)')
Just making sure this is along the lines of the requested code to be made

 채택된 답변

Star Strider
Star Strider 2018년 2월 3일

0 개 추천

It seems correct to me, and produced the plot I would expect. I would add grid on at the end to include the grid (personal preference).

추가 답변 (0개)

카테고리

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

태그

질문:

2018년 2월 3일

답변:

2018년 2월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by