Creating a new matrix by interpolating two other matrices
이전 댓글 표시
Hello,
I need to write a code that creates a new matrix C based on the values of matrix A and B, where A and B are 61x10 matrices. Each column of the matrices represents a variable that is common for both A and B and needs to be computed for the new matrix C by interpolating between the columns of these two matrices.
I need to formulate this as a matlab code, but not sure how to start. Do I need to use any built-in function to do the interpolation, or would it be fine to write the interpolation function by myself? Also, I have a total of 10 columns (corresponding to 10 different variables), how do I write the for loop such that the calculations are done for each of the variables (columns) over their 61 values (rows)?
I hope my question makes sense. Thanks in advance.
채택된 답변
추가 답변 (1개)
Image Analyst
2015년 5월 9일
What's wrong with the obvious averaging????
C = (A+B)/2;
댓글 수: 3
Summer
2015년 5월 9일
Image Analyst
2015년 5월 9일
Ah - a key bit of information you didn't explicitly state (though I wondered about before posting). What is w?
Summer
2015년 5월 9일
카테고리
도움말 센터 및 File Exchange에서 Interpolation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!