Azzera filtri
Azzera filtri

calculate weighted difference and assigning names to it

1 visualizzazione (ultimi 30 giorni)
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 Commento
Guillaume
Guillaume il 3 Nov 2014
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.

Accedi per commentare.

Risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by