Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
input declaration in interpreted matlab function

Subject: input declaration in interpreted matlab function

From: ali h

Date: 13 Jun, 2013 11:46:28

Message: 1 of 2

Hi every body ...
am using interpreted matlab function with one vector input and am facing a problem with defining this input vector to the program
the code :
function [qqq] = dload(x)
con = x(1:4);
reji = x(5:8);
thr=0.5;
the error message :
??? Input argument "x" is undefined.

Error in ==> dload at 6
con = x(1:4);

thank you very much

Subject: input declaration in interpreted matlab function

From: dpb

Date: 13 Jun, 2013 12:18:06

Message: 2 of 2

On 6/13/2013 6:46 AM, ali h wrote:
> Hi every body ...
> am using interpreted matlab function with one vector input and am facing a problem with defining this input vector to the program
> the code :
> function [qqq] = dload(x)
> con = x(1:4);
> reji = x(5:8);
> thr=0.5;
> the error message :
> ??? Input argument "x" is undefined.
>
> Error in ==> dload at 6
> con = x(1:4);
>

You don't show the calling sequence but apparently you didn't pass an
argument...

inputforthefunction=rand(1,20); % say; for some arbitrary data
d=dload(inputforthefunction); % now call your function...

--

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us