calculate weighted difference and assigning names to it
2 ビュー (過去 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!