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:
Extracting Coefficients from A String

Subject: Extracting Coefficients from A String

From: Raymond

Date: 23 Sep, 2013 02:56:07

Message: 1 of 2

Hello All,

I am working on the some basic control problems. I need to extract the coefficients of the denominator/ numerator from a string

For example,
str1 = '1 2 3 4 0 0 2' then
den = [1 2 3 4 0 0 2]

Any helps or hint will be appreciated.

Subject: Extracting Coefficients from A String

From: dpb

Date: 23 Sep, 2013 02:59:38

Message: 2 of 2

On 9/22/2013 9:56 PM, Raymond wrote:
> Hello All,
>
> I am working on the some basic control problems. I need to extract the
> coefficients of the denominator/ numerator from a string
>
> For example,
> str1 = '1 2 3 4 0 0 2' then
> den = [1 2 3 4 0 0 2]
>
> Any helps or hint will be appreciated.

doc str2num % or sscanf and friends...

--

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