Loop with two varying conditions
이전 댓글 표시
Hello
I would like to have some help with the following (probably simple but has me stumped) problem.
I have a matrix [35040 x 2] consisting of a datenumber series in one column and corresponding values. I also have a vector [12 x 1] values.
I am trying to add each value from the vector to all values in each corresponding month in the matrix. Like this:
(lets call this a month)
735235.010416667 4.36000000000000
735235.020833333 4.44000000000000
735235.031250000 4.43500000000000
735235.041666667 4.41000000000000
735235.052083333 4.37000000000000
735235.062500000 4.35000000000000
735235.072916667 4.35000000000000
Add value vector(1,1) to the above. Then repeat this by adding value vector(2,1) to the values of month 2 from matrix.
Any help really appreciated. Thanks !
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!