calculate weighted difference and assigning names to it
조회 수: 1 (최근 30일)
이전 댓글 표시
Dear friends, I am working on one problem, it looks like this, a matrix xxx with n columns, the first row is the name of variables, suppose it has 6 variables, a, b,c,d,e,and f, the second to last row are corresponding observations of these variables. there is another matrix YYY, exactly the same size as xxx, also first row is name variables, aa, bc,cc,dd,ee, and ff, the second to last row are observations. what I want to achieve is to calculate (1/aa)*a-(1/bb)*b, and assign a name to it as ab, no need to calculate ba, which is simply -ab. so, in total, there will be 6*5/2=15 columns to be calculated. can you advise me how to do this task? thanks a lot.
댓글 수: 1
Guillaume
2014년 11월 3일
Could you give an example of your 'matrices' and the result you want, as it's not very clear what the format of your data is.
In particular, a matrix can't contain strings and numbers, so I suspect what you have are cell arrays or maybe tables.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!