How do I plot a point on a spherical system?

14 ビュー (過去 30 日間)
Dania Khan
Dania Khan 2019 年 11 月 10 日
コメント済み: Walter Roberson 2019 年 11 月 10 日
This is my instructor's instructions:
Problem 8 ‐ MATLAB Write a MATLAB script to generate a plot of the vector A= (8, pi/3, pi/6) in spherical coordinate system. Fully label and title your plot including a grid.
This is what I have so far and I know it isn't right. Help!
clear all; %clear variables
clc; %clear previous window
syms r t rho
pi=3.1415;
r=8;
t=(pi/3);
rho=(pi/6);
z= cos(rho)*(r);
y=r*(sin(rho))*(cos(t));
x=r*(sin(rho))*(cos(t));
figure
[x,y,z]=sphere();
surf(x, y, z)

回答 (0 件)

カテゴリ

Help Center および File ExchangeCalculus についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by