MATLAB: I want to 3D plot the functions below but nothing appear on the figure, what should I add/change 3d plot a = 0.25; theta = 0; r = 0.25; x = (30/2)*((1-(a^2/r^2))+(1+3*(a^4/r^4)-4*(a^2/r^2)*cos(2*theta))) y = (30/2)*((1+(a^2/r^2))-(1+3*(a^4/r^4)*cos(2*theta))) z = -(30/2)*((1-3*(a^4/r^4)+2*(a^2/r^2))*sin(2*theta)) plot3(x,y,z) Best Answer You are just giving 1 value to a,r ant theta. You have to give them different values using a=ini:h:fin loops. Hope it works with that. Regards Related SolutionsMATLAB: Error “Matrix dimensions must agree” what should I fix a = 0.25;theta = 0;r = [0:12];x = (30/2)*((1-(a^2./r.^2))+(1+3*(a^4./r.^4)-4*(a^2./r.^2)*cos(2*theta))) ;y = (30/2)*((1+(a^2./r.^2))-(1+3*(a^4./r.^4)*cos(2*theta))) ;z = -(30/2)*((1-3*(a^4./r.^4)+2*(a^2./r.^2))*sin(2*theta)) ;figure (1)plot(x)figure (2)plot(y)figure (3)plot(z)element by element division. MATLAB: Figure, data and video Yes. See the File Exchange contribution "video_fig" for an example of what can be done. Related QuestionSolve function returns expression in terms of zParent patch to figure, not axesPlot a elliptic coneReduce the size of figure,
Best Answer