MATLAB: Am I get discontinuous plot plot 2d Why am I get discontinuous plot? x = -2*pi:.1:2*pi;y = 2e-6*sin(x).*cos(x)/(10.5e-12*sin(x).^2+13.8e-12*cos(x).^2); Best Answer Use ./ instead of /x = -2*pi:.1:2*pi;y = 2e-6*sin(x).*cos(x)./(10.5e-12*sin(x).^2+13.8e-12*cos(x).^2);plot(x,y) Related SolutionsMATLAB: Plotting Discontinuous Function Draw it continuous segment by continuous segment, OR put a NaN between the continuous parts. Or just let it connect the discontinuous parts.Have you considered a stairs plot? MATLAB: Having trouble graphing a non-linear graph x = -2:0.01:2;y = cos(x)+exp(-1/2*x.^2).*sin(6*x);plot(x,y) Related QuestionDraw a discontinuous lineIndex exceeds matrix dimensions. in for loop !Undefined variable “cos” or class “cos”. Error in P4Afara_Question2 (line 5) z = (cos(x)).*cos(sqrt(x.^2 + y.^2)).exp(-1*abs(0.2*x));
Best Answer