non linear equation

Hi, I use GAUSS 17. I am having some trouble to plot and equation (possibility production frontier). I get the error : "G0036: Matrices are not comfortable". I don't get why.

x = seqa(0.1,0.001,3000);
xsq = x^2;
xsqr = sqrt(xsq+48);
z = (x*xsqr);

I am trying to plot:


So sorry for the noob question





1 Answer


The last line of your initial code chunk

z = (x*xsqr);

will give you the matrices not conformable error, because x and xsqr are both 3000x1 vectors and the * operator performs matrix multiplication in the case in which both of the operands are matrices or vectors. If you use .* i.e. dot multiply, it will perform element-by-element multiplication, like this

z = x .* xsqr;

You must login to post answers.

Have a Specific Question?

Get a real answer from a real person

Need Support?

Get help from our friendly experts.

Try GAUSS for 30 days for FREE

See what GAUSS can do for your data

© Aptech Systems, Inc. All rights reserved.

Privacy Policy