Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Matrix
Replies: 3   Last Post: Apr 8, 2013 3:32 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
dpb

Posts: 8,231
Registered: 6/7/07
Re: Matrix
Posted: Apr 8, 2013 9:39 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 4/8/2013 6:30 AM, Muhammad wrote:
> Dear all
> I have a matrix I got from the loop;
>
> for 1:1000
> peakLoc=peakfinder(h1(:,i))
> peak(:,i)=peakLoc(:,1)
> end
>
> I got error state that
> "Subscripted assignment dimension mismatch".
>
> How could I store in the variable in the column i from 1 to 1000 for
> matrix that doesn't have similiar row.


What's peakfinder() return? Is it a variable number of peaks, I'm
guessing, maybe? If so, here's where a cell array would be useful--

peak(i)={peakfinder(h1(:,i));

My crystal ball says will be the same as your intermediary step except
for being a cell array

Read the "Getting Started" section on data storage on cell arrays, etc.

--


Date Subject Author
4/8/13
Read Matrix
Muhammad
4/8/13
Read Re: Matrix
dpb
4/8/13
Read Re: Matrix
Muhammad
4/8/13
Read Re: Matrix
dpb

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.