From: carlos on 27 May 2010 18:04 Walter Roberson <roberson(a)hushmail.com> wrote in message <htmpin$57r$1(a)canopus.cc.umanitoba.ca>... > carlos wrote: > > > In a edit_box I insert the next one string: > > [1.2 0.001 44] > > > > I'd like to turn this expression into an array in which I could mean to > > every single component, as follows: the first component ==> 1.2 > > the second one==>0.001 > > the third one==> 44 > > > can you help me??? > > str2mat('[1.2 0.001 44]') > > > Many thanks dudes! > > Not all of us are dudes. Thanks Walter!! I tried with your solution before but if I type this: a=str2mat('[1.2 0.001 44]'); And I want to know the first component a(1), matlab give me back >> a(1) ans = [ Perhaps I have to make a function. Anyway, I apologize to you and to everyone whether you get upset about it. Many thanks.
From: Walter Roberson on 27 May 2010 18:15 us wrote: > Walter Roberson >> str2mat('[1.2 0.001 44]') > > in the context of this OP, walter most likely meant to say > > str2num('[1.2 0.001 44]') Dang, str2mat is not the inverse of mat2str! :(
From: carlos on 27 May 2010 18:47
Walter Roberson <roberson(a)hushmail.com> wrote in message <htmqv6$6vm$2(a)canopus.cc.umanitoba.ca>... > us wrote: > > Walter Roberson > >> str2mat('[1.2 0.001 44]') > > > > in the context of this OP, walter most likely meant to say > > > > str2num('[1.2 0.001 44]') > > Dang, str2mat is not the inverse of mat2str! :( > Guys I got it. str2num is ok. Many thanks!! |