some will increase some will not change and some will decrease. This is a similar question to Neat way to loop with both index and value in Matlab. for i1:0.1:10, a(i)i end Advance thanks for the help. What i would like to do is plot a histogram of each mass by giving it a range for background and a range for afterwards and subtracting the average intensities of these ranges to give something like this: How to do decimal increments in for loop with arrays. the value in row 1 is scan 1 for mass 38, second row is scan 1 mass 39, row 170 is scan 2 of mass 38, row 171 is scan 2 of mass 39 and so on. This matches an intensity value for the respective mass i.e. for index values, statements, end executes a group of statements in a loop for a specified number of times. here's what the file looks like once i open it with mzcdfread Īs you can see there are 39603 entries for mass_values and the same amount for intensity_values.įor the specific file the masses range from 38-200 (every integer in that range) so the 39603 is 38.200 repeating. Using for loop, you dont need to increment the counter manually. Each with a different range of masses, times and intensities.Ģ-4) The file is a raw data file of an online (sampling continuously) mass spec. The original code uses a while loop to iterate over odd numbers and sum their values. 1) I will need to run the code on tens of files.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |