I am new to Matlab and I am getting the following error;
Warning: Imaginary parts of complex X and/or Y arguments ignored
> In create_hyperbola at 13
Warning: Imaginary parts of complex X and/or Y arguments ignored
> In create_hyperbola at 15

what does this mean and why is this?

thanks in advance

% Program to plot the hyperbola% y^2/a^2 - x^2/b^2 = 1% The hyperbolae are open up/down, so that x is the independent variable% for plotting. (Using the form x^2/a^2 - y^2/b^2 = 1 requires that y be% the independent variable, which is awkward programming-wise.)clear % all variablesfigure(1), hold off % start a new figureset(gca,'FontSize',14) % adjust fontsizexmax = 30; ymax = 20;x = linspace(-xmax,xmax,1001); % array of x values for plot (why 1001?)a = 5; b = 3;y=sqrt(((-x.^2)./(b^2)+1).*a^2); % corresponding y valuesplot(x,y)hold on % add to current plotxlabel('x')ylabel('y')title(['Hyperbola $y^2/a^2 - x^2/b^2 = 1$; $a$ = ', num2str(a), ...', $b$ = ', num2str(b),'; (WR 1/21/08)'],'Interpreter','latex')% Add axesplot([0 0],[-ymax ymax],'k') % y axis (black line - k)plot([-xmax xmax],[0 0],'k') % x axis

Actually you will get different result. You probably just need what you get, but worry about the warning? Just ignore it, or you can get real part from complex y with real(y).
So in your code line

This is because when you calculating y (line 12) you getting square root mostly from negative numbers. So your y is vector of complex numbers. You get this because when you do -x.^2, it gets square first, than adds minus.
Do (-x).^2.

Actually you will get different result. You probably just need what you get, but worry about the warning? Just ignore it, or you can get real part from complex y with real(y).

There is an easy way, in .NET, to centralize the treatment of all unexpected errors.
First of all, instead of launching the application directly in a Form, you need first to write a Sub called Main, in a module. Then, set the Startup Object to th…

If you haven’t already, I encourage you to read the first article (http://www.experts-exchange.com/articles/18680/An-Introduction-to-R-Programming-and-R-Studio.html) in my series to gain a basic foundation of R and R Studio. You will also find the …

In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…