matching elements between two arrays
이전 댓글 표시
I have two arrays, just one column each. In the first array i have hourly electricity prices and in the other one natural gas prices. I want to match electricity prices with NG. For example:
Electricity an array with 22848 rows, containing elec prices in the form of 24h blocks.
NG an array with 904 rows.
I want next to electricity (another column, column 2 in elec array) prices to have the NG price given that in the same 24h block we have one daily NG price.
댓글 수: 3
Azzi Abdelmalek
2013년 8월 28일
Give a short numeric example , (10 rows for example) with the expected resullt
Walter Roberson
2013년 8월 28일
If NG is 904 daily rows, then how do those rows correspond to the 22848 hourly electrical figures, considering that 22848 hourly would be 952 days ?
George
2013년 8월 29일
채택된 답변
추가 답변 (1개)
Walter Roberson
2013년 8월 28일
[Electricity, reshape( NG(:,ones(1,24)), [], 1)]
댓글 수: 2
George
2013년 8월 28일
Walter Roberson
2013년 8월 28일
As I asked above,
If NG is 904 daily rows, then how do those rows correspond to the 22848 hourly electrical figures, considering that 22848 hourly would be 952 days ?
카테고리
도움말 센터 및 File Exchange에서 Sources에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!