Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: function arguments
Replies: 2   Last Post: Mar 6, 2013 9:04 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Alan Weiss

Posts: 1,259
Registered: 11/27/08
Re: function arguments
Posted: Mar 6, 2013 8:00 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 3/6/2013 3:18 AM, Moon Datta wrote:
> I am using a fuction in matlab....like below
>
> function [b, j] = descsort(a);
>
> [b ,j] = sort(-a);
>
> b = -b;
>
> I have already a variable 'a' in the workspace. but after running the
> program it is showing that
>
> Input argument "a" is undefined.
>
> how to define the input argument for a function???
>
>
> thanks in advance


You need to call the function as follows:
[b,jout] = decsort(a)

You can't just input
decsort

Alan Weiss
MATLAB mathematical toolbox documentation



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.