[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
problem plotting "N-d object"
From: |
Sergei Steshenko |
Subject: |
problem plotting "N-d object" |
Date: |
Fri, 17 Feb 2012 07:15:15 -0800 (PST) |
Hello,
here is a screen session:
"
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 don't understand why 'octave' complains about N-d objects - to me
"foo(1,1,:)" looks like a 1-d object. Because the first two of the three
indexes are fixed in the expression.
And adding "(:)" solves the problem.
Just wondering - should it be that hard for end user ? Does Matlab behave the
sane way ?
Thanks,
Sergei.
- problem plotting "N-d object",
Sergei Steshenko <=
- Re: problem plotting "N-d object", Ben Abbott, 2012/02/17
- Re: problem plotting "N-d object", Sergei Steshenko, 2012/02/17
- Re: problem plotting "N-d object", Jordi Gutiérrez Hermoso, 2012/02/17
- Re: problem plotting "N-d object", Ben Abbott, 2012/02/17
- 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