MATLAB: MatLab code for generating a surface as shown in the attached figure: an ellipse in the X-Y plane is twisted by 90deg as it progresses along Z-axis. axis changingcurve fitting Best Answer As an approximation:[TH,R] = ndgrid(linspace(0,pi/2,200),linspace(10,22,200));Z = sin(50*TH);[X,Y,ZZ] = pol2cart(TH,R,Z);surf(X,Y,ZZ,'edgecolor','none')axis equalview(-35,66) Related SolutionsMATLAB: Z is not matrix for surf(X,Y,Z) TH = [0:0.05*pi:2*pi ]; R = [0:0.5:20]; [X,Y] =pol2cart(TH,R); [X,Y] = meshgrid(X,Y) ;[R,TH] = meshgrid(R,TH) ;Z = (abs((sqrt(2)/(81*sqrt(pi))).*(6.*R-R.^2).*exp(-R./3).*cos(TH))).^2 ;figuresurf(R,TH,Z)figuresurf(X,Y,Z) MATLAB: Contour in vertical plane Parent the contour to a hgtransform and set its transform matrix see makehgtform Related QuestionText in a figure: Increasing Font SizePlot a curve as a vertical 3D surface in MATLAB
Best Answer