The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

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,430
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 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

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]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.