[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problem plotting "N-d object"
From: |
Sergei Steshenko |
Subject: |
Re: problem plotting "N-d object" |
Date: |
Tue, 21 Feb 2012 06:57:03 -0800 (PST) |
--- On Tue, 2/21/12, Ben Abbott <address@hidden> wrote:
> From: Ben Abbott <address@hidden>
> Subject: Re: problem plotting "N-d object"
> To: "CdeMills" <address@hidden>
> Cc: address@hidden
> Date: Tuesday, February 21, 2012, 5:29 AM
> On Feb 21, 2012, at 5:29 AM, CdeMills
> wrote:
>
> > bpabbott wrote
> >
> >> I had thought broadcasting would require the dot
> type operator ".+" and
> >> that "+" would behave in a strict/pedantic manner
> (as with multiplication
> >> and division).
> >>
> >> In any event, I do think there is a parallel to be
> drawn for N-d plotting.
> >
> > Ben,
> >
> > I had the same idea.
> >
> > I often run simulations, producing 2D arrays at each
> step, and collating
> > everything in a 3D array.
> >
> > Then I plot everything as:
> >
> > hold on; resu = [];
> > for inds = (Nsimu:-1:1)
> > resu(inds, 1) = plot(somevar(:, :, inds));
> > endfor
> > hold off
> >
> > That is, the third dim is "peeled" slice by slice, and
> all 2D graphs are
> > concatenated together. Similary, the result is a
> vector a graph handles.
> > Would this seems an acceptable way to "plot" a 3D array
> ?
> >
> > Regards
> >
> > Pascal
>
> For plotting that is a good solution.
>
> In my work, I work with a lot of frequency dependent
> systems, which we represent as matrices ... matrices with
> different elements for each frequency.
>
> For this purpose., we use the 3rd dimension to represent
> frequency. This allows us to peal off frequency and do the
> usual linear algebra.
>
> We'd also like to plot the elements of a matrix by something
> like ...
>
> plot (f, A(1,1,:), f, A(1,2,:), f,
> A(2,1,:), f, A(2,2,:))
>
> Instead of that we have to squeeze() each frequency
> dependent matrix element first.
>
> There are ways to work around this. For example, we often
> permute, then plot, permute, and continue with the linear
> algebra. Other times we use squeeze().
>
> I'd prefer to just use the syntax above.
>
> Ben
>
"I'd prefer to just use the syntax above" - I think that was my original
request, wasn't it ?
Thanks,
Sergei.
- Re: problem plotting "N-d object", (continued)
- Re: problem plotting "N-d object", Ben Abbott, 2012/02/19
- Re: problem plotting "N-d object", CdeMills, 2012/02/19
- 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 <=
- Re: problem plotting "N-d object", Ben Abbott, 2012/02/17
- Re: problem plotting "N-d object", Ben Abbott, 2012/02/18
- Re: problem plotting "N-d object", James Sherman Jr., 2012/02/17
- Re: problem plotting "N-d object", Sergei Steshenko, 2012/02/17