[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problem plotting "N-d object"
From: |
CdeMills |
Subject: |
Re: problem plotting "N-d object" |
Date: |
Sun, 19 Feb 2012 09:33:35 -0800 (PST) |
Sergei Steshenko-2 wrote
>
> I think we've lost track.
>
> To write "-squeeze" takes more effort than just "(:)".
>
> But the root cause of my original Email is that Octave _wrongly_ thinks
> that foo(1,1,:) is an N-d object.
>
> The original testcase:
>
> "
> octave:3> foo(1,1,:) = [1 2 3]
> foo =
>
> ans(:,:,1) = 1
> ans(:,:,2) = 2
> ans(:,:,3) = 3
>
> octave:4> plot(foo(1,1,:));
> error: transpose not defined for N-d objects
> error: called from:
> error:
> /home/qemu/AFSWD/20111122/octave-3.4.2/share/octave/3.4.2/m/plot/private/__plt__.m
> at line 179, column 8
> error:
> /home/qemu/AFSWD/20111122/octave-3.4.2/share/octave/3.4.2/m/plot/private/__plt__.m
> at line 104, column 17
> error:
> /home/qemu/AFSWD/20111122/octave-3.4.2/share/octave/3.4.2/m/plot/plot.m at
> line 194, column 9
> octave:4> plot(foo(1,1,:)(:));
> octave:5>
> ".
>
> I insist that in this case foo(1,1,:) is a _one_-d object - because two of
> the three indexes are fixed/constant.
>
> I.e. the plot family of functions tries to do the right thing already, but
> because foo(1,1,:) is _not_ seen by Octave as a 1-d object the functions
> fail.
>
>
>
I think we didn't.
As I told in a previous post, enabling automatic size reduction would
prevent to detect buggy code, i.e. code where a 3D result is produced when a
2D result is expected.
OTOH, 'plot' accepts a number of xy combinations: empty x- vector y; empty
x- matrix y, vector x-vector y, matrix x-vector y, vector x - matrix y. What
to do if there is one singleton dim, if there are two ? Could you elaborate
?
Regards
Pascal
--
View this message in context:
http://octave.1599824.n4.nabble.com/problem-plotting-N-d-object-tp4397525p4402070.html
Sent from the Octave - General mailing list archive at Nabble.com.
- Re: problem plotting "N-d object", (continued)
- Re: problem plotting "N-d object", Jordi Gutiérrez Hermoso, 2012/02/17
- Re: problem plotting "N-d object", CdeMills, 2012/02/17
- Re: problem plotting "N-d object", Ben Abbott, 2012/02/17
- Re: problem plotting "N-d object", CdeMills, 2012/02/18
- Re: problem plotting "N-d object", Ben Abbott, 2012/02/18
- Re: problem plotting "N-d object", Jordi Gutiérrez Hermoso, 2012/02/18
- Re: problem plotting "N-d object", Sergei Steshenko, 2012/02/19
- Re: problem plotting "N-d object", Ben Abbott, 2012/02/19
- Re: problem plotting "N-d object", Sergei Steshenko, 2012/02/19
- Re: problem plotting "N-d object", Ben Abbott, 2012/02/19
- Re: problem plotting "N-d object",
CdeMills <=
- Re: problem plotting "N-d object", Sergei Steshenko, 2012/02/19
- Re: problem plotting "N-d object", CdeMills, 2012/02/20
- Re: problem plotting "N-d object", Pascal A. Dupuis, 2012/02/20
- Re: problem plotting "N-d object", Jordi Gutiérrez Hermoso, 2012/02/20
- Re: problem plotting "N-d object", Pascal A. Dupuis, 2012/02/20
- Re: problem plotting "N-d object", Ben Abbott, 2012/02/20
- Re: problem plotting "N-d object", CdeMills, 2012/02/21
- Re: problem plotting "N-d object", Ben Abbott, 2012/02/21
- Re: problem plotting "N-d object", Sergei Steshenko, 2012/02/21
- Re: problem plotting "N-d object", Ben Abbott, 2012/02/17