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:
How to convert input string into character array?

Subject: How to convert input string into character array?

From: Lu Yaseen

Date: 7 Dec, 2012 07:06:21

Message: 1 of 1

 Guys i was wondering how can i convert an input string into a character array?

for example this input
str = input('Enter Sentance', 's');
Enter Sentance Hello Everyone in the world
%{ str = Hello Everyone in the world }%

is it possible to convert str into something like this for example and array of 4 x 4
takes the first word "Hello"

mat = [ H E L L
           O P Q R
           S T U V
           W X Y Z ]

then takes the next word " Everyone"

mat = [ E V E R
            Y O N E
            S T U V
            W X Y Z]

And so on
           

Tags for 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