Thread Subject: How do I read a series of data into a matrix with fixed row number but varing column number?

Subject: How do I read a series of data into a matrix with fixed row number but varing column number?

From: Tiger Smith

Date: 25 Aug, 2009 18:13:01

Message: 1 of 1

I need read in a series of number, for example 5 channels. That's the row number.The row number is fixed.
 And I must read it from channel 1 to the last channel.
But each channel the data length keep changing and I can't get the length information in advance. I want to put these data in a matrix and use it later. For the channel with short data I can pad in the mean of the data or zero.
How can I generate such a matrix with fixed number of row and column number is the max length of the data of one channel?

Thank you.

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us at files@mathworks.com