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:
num2str error

Subject: num2str error

From: Olivier

Date: 4 May, 2013 20:01:08

Message: 1 of 3

Hi all.
Here is a part of my code:

>>maxzarb=3;
minzarb=-3;
disp(['Record exclusion parameters: <' num2str (minzarb) '; >' num2str (maxzarb)]) ;
%error message:
Error using num2str (line 41)
Not enough input arguments.

%but if I put :

>> num2str (minzarb)

ans =

-3
>> num2str (maxzarb)

ans =

3


% I can t get what the problem is ...

Any suggestion?

Subject: num2str error

From: Nasser M. Abbasi

Date: 4 May, 2013 20:56:13

Message: 2 of 3

On 5/4/2013 3:01 PM, Olivier wrote:
> Hi all.
> Here is a part of my code:
>
>>> maxzarb=3;
> minzarb=-3;
> disp(['Record exclusion parameters: <' num2str (minzarb) '; >' num2str (maxzarb)]) ;
> %error message:
> Error using num2str (line 41)
> Not enough input arguments.
>
> %but if I put :
>
>>> num2str (minzarb)
>
> ans =
>
> -3
>>> num2str (maxzarb)
>
> ans =
>
> 3
>
>
> % I can t get what the problem is ...
>
> Any suggestion?
>


try removing the space between the function and its argument.

disp(['Record exclusion parameters: <' num2str(minzarb) '; >' num2str(maxzarb)])
Record exclusion parameters: <-3; >3


EDU>> disp(['Record exclusion parameters: <' num2str(minzarb) '; >' num2str (maxzarb)])
Error using num2str (line 36)
Not enough input arguments.
  

--Nasser

Subject: num2str error

From: Olivier

Date: 5 May, 2013 04:27:07

Message: 3 of 3

"Nasser M. Abbasi" wrote in message <km3sl6$u4l$1@speranza.aioe.org>...
> On 5/4/2013 3:01 PM, Olivier wrote:
> > Hi all.
> > Here is a part of my code:
> >
> >>> maxzarb=3;
> > minzarb=-3;
> > disp(['Record exclusion parameters: <' num2str (minzarb) '; >' num2str (maxzarb)]) ;
> > %error message:
> > Error using num2str (line 41)
> > Not enough input arguments.
> >
> > %but if I put :
> >
> >>> num2str (minzarb)
> >
> > ans =
> >
> > -3
> >>> num2str (maxzarb)
> >
> > ans =
> >
> > 3
> >
> >
> > % I can t get what the problem is ...
> >
> > Any suggestion?
> >
>
>
> try removing the space between the function and its argument.
>
> disp(['Record exclusion parameters: <' num2str(minzarb) '; >' num2str(maxzarb)])
> Record exclusion parameters: <-3; >3
>
>
> EDU>> disp(['Record exclusion parameters: <' num2str(minzarb) '; >' num2str (maxzarb)])
> Error using num2str (line 36)
> Not enough input arguments.
>
>
> --Nasser
Great, thank you nasser, I thought spaces where not a problem...

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