calculate weighted difference and assigning names to it

조회 수: 1 (최근 30일)
Peihong
Peihong 2014년 11월 3일
댓글: Guillaume 2014년 11월 3일
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
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 CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by