help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Solving Complex Simultaneous Equations


From: James Sherman Jr.
Subject: Re: Solving Complex Simultaneous Equations
Date: Thu, 20 Jun 2013 12:04:21 -0400




On Thu, Jun 20, 2013 at 11:45 AM, JoshE87 <address@hidden> wrote:
I have typed what you said, substituting in the real equations in for the
dummy ones, and it did not work.  I do actually have knowledge of what the
"." means at the end of the matrix, and I have been using that extensively.

Can you please explain the use of the "@s"?  Thanks very much for the help.



--
View this message in context: http://octave.1599824.n4.nabble.com/Solving-Complex-Simultaneous-Equations-tp4654441p4654574.html
Sent from the Octave - General mailing list archive at Nabble.com.
_______________________________________________
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave

That @ symbol defines what are the inputs to your function.  So, something like

f1 = @(X) (X.^2)

Is a function that takes one input called X and squares every element of X, whereas 

f2 = @(X,Y) (X+Y)

is a function that takes two inputs, the first one is called X and the second is called Y and adds them.  This is particularly important in your example, because something like:
u = 2;
f3 = @(X) (X*u)
Is equivalent to writing:
f4 = @(X) (X*2)

both are functions with 1 input that multiplies that input by 2.  However this is different than
u = 2;
f5 = @(X,u) (X*u)
Where now the u=2 assignment is "ignored" and f5 is a function of two inputs, X and u.

Hope this helps,

James Sherman

reply via email to

[Prev in Thread] Current Thread [Next in Thread]