how to add columns with a certain formula
Show older comments
Hi guys, I have a cell array with 90 cells. Each cell consits of a table or matrix with 6 columns and one million rows.
Column 1 shows date. Column 2 shows time. Column 3 shows max value. Column 4 shows min value. Column 5 shows closing value. Column 6 shows the average value of column 3/4.
I want to do the following:The first row and column of the cell array should have the following formula: (column 6 - (min value of row 1 to 60 of column 4))/((max value of row 1 to 60 of column 3) - (min value of row 1to 60 of column 4)). I want this formula to be applied for the first 60 rows. At row 61 i want the formula to change to: (column 6 - (min value of row 61 to 120 of column 4))/((max value of row 61 to 120 of column 3) - (min value of the row 61 to 120 of column 4)). I want this formula to jump after every 60 rows until all rows are covered. Thanks
Accepted Answer
More Answers (0)
Categories
Find more on Whos in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!