How do I plot a point on a spherical system?
15 views (last 30 days)
Show older comments
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)
Answers (0)
See Also
Categories
Find more on Calculus in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!