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: String Problem !
Replies: 3   Last Post: Mar 1, 2013 2:11 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
James Tursa

Posts: 2,069
Registered: 8/5/09
Re: String Problem !
Posted: Feb 28, 2013 1:28 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Amir " <amirkms@yahoo.com> wrote in message <kgo74r$gga$1@newscl01ah.mathworks.com>...
> Hi
> I want to make a conversation with operators that using my program
> this is like :
>
> SystemUnit=input('Please choose units system\n \n use M for METRIC and I for IMPERIAL <M> ?');
>
> but there is a problem when operator type M or I and i think because SystemUnit is an integer and I don't know how i can define a String !
>
> some one please help me
> thx


SystemUnit=input('Please choose units system\n \n use M for METRIC and I for IMPERIAL <M> ?','s'); % <-- Added 's' qualifier argument

James Tursa



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.