[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: octave 3.2.4 - sprintf error message
From: |
Thomas Weber |
Subject: |
Re: octave 3.2.4 - sprintf error message |
Date: |
Sun, 31 Oct 2010 16:43:14 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Fri, Oct 29, 2010 at 11:42:09AM +0200, address@hidden wrote:
> Dear Users,
>
> we like to switch in the near future from Version 3.0.5 to 3.2.4 and getting
> an error message in the early tests with 3.2.4.
I suggest going directly to the 3.3 series (which should become stable
in the not too distant future). There won't be any more releases in the
3.2 series.
>
> We are using the following script in 3.0.5 and 3.2.4:
>
> # cat rwu_test_sprintf.m
> 1
> 2 VL_STIEL_LINIE_ROH= ["a";"b";"c"];
> 3
> 4 VL_STIEL_LINIE=cellstr(VL_STIEL_LINIE_ROH);
> 5
> 6
> 7 VL_TEST=sprintf("String ->%s<-",VL_STIEL_LINIE(2))
>
> After executing the script in 3.0.5 we get this result: VL_TEST = String ->b<-
>
> In 3.2.4 we get this error:
>
> error: sprintf: wrong type argument `cell'
> error: called from:
> error: ./rwu_test_sprintf.m at line 7, column 8
>
> (I added the line numbers above in the script for better reference to the
> error message)
>
> Anyone have an idea what's the problem?
VL_STIEL_LINIE is a cell array, so you must access its second element as
VL_STIEL_LINIE{2}
(mind the braces) or convert it explicitely:
cell2mat(VL_STIEL_LINIE(2))
Thomas