V. simple Matlab plotting question

Mar 2016
170
0
Australia
Hi,

As part of a bigger question I have to create a simple plot in Matlab.

Could anyone tell me where I am going wrong in the simple script below:

%Test Plot
x=-2:0.01:4;
D=sqrt(x.^2+(x.^2-2*x-4).^2);
Plot(x,D);

Kind regards
Beetle
 

romsek

MHF Helper
Nov 2013
6,664
3,000
California
please just put questions in a single forum.

they'll be seen