Forums > Max For Live

Delete recurring character from Matrix

December 31, 2013 | 8:14 am

Hey this might be pretty simple but I can’t seem to figure it out, I’m pretty new to this. I have a matrix of data imported from the web that looks something like this (only many times longer):

773 P
428 P
-121 P
-878 P
-946 P
-1220 P
-1430 P
-815 P
2320 P
7180 P
9280 P
10300 P
10800 P
11500 P

I need to remove the ‘P’ from every line and find the average of the numbers. I can’t offset the matrix because the different lengths of the numbers. Any clues?

Thanks all!
Aaron


December 31, 2013 | 9:57 am

Something like this should do the job..
<code>

– Pasted Max Patch, click to expand. –

</code>


January 7, 2014 | 10:52 am

Thanks LSKA, that didn’t quite get it. I think it’s because of the way the data is imported. It seems that each digit/character is housed as a cell in the matrix individually rather than the whole integer. I’m trying to pull in the numbers in the next to last column here:

http://waterdata.usgs.gov/nwis/uv?cb_00060=on&format=rdb&period=&begin_date=2014-01-06&end_date=2014-01-07&site_no=03431500

using the patch that was pasted here:

http://cycling74.com/forums/topic/how-to-input-weather-data-in-max/

I can extract a single row of the number and use that, but not the column. When I offset the matrix to narrow down the options the offset is based on each character not each column as seen on the web.



MIB
January 8, 2014 | 1:49 pm

maybe this?

<code>

– Pasted Max Patch, click to expand. –

</code>


Viewing 4 posts - 1 through 4 (of 4 total)