Help with operations between elements from a matrix
Mostrar comentarios más antiguos
Hi, everybody
First of all, it is not a homework, it is a real operation that I need to do in my project, but I can't..
It is hard to explain, but I need to make a ponderation between elements with the same ID using the values from a column. The exactly operations are in the comments below:
26 1 % 26/26 = 1
35 2 % 35/35 = 1
27 3 % 27/27 = 1
25 4 % 25/25 = 1
41 5 % 41/(41+28+34) = 0.3981
28 5 % 28/(41+28+34) = 0.2718
34 5 % 35/(41+28+34) = 0.3398
34 6 % 34/(34+34) = 0.5
34 6 % 34/(34+34) = 0.5
29 7 % 29/(29+34) = 0.4603
34 7 % 34/(29+34) = 0.5397
24 8 % 28/28 = 1
35 9 % 35/(35+38+29+28) = 0.2692
38 9 % 38/(35+38+29+28) = 0.2923
29 9 % 29/(35+38+29+28) = 0.2231
28 9 % 28/(35+38+29+28) = 0.2154
40 10 % 40/(40+34) = 0.5405
34 10 % 34/(40+34) = 0.4594
The solution would be:
26 1 1
35 2 1
27 3 1
25 4 1
41 5 0.3981
28 5 0.2718
34 5 0.3398
34 6 0.5
34 6 0.5
29 7 0.4603
34 7 0.5397
24 8 1
35 9 0.2692
38 9 0.2923
29 9 0.2231
28 9 0.2154
40 10 0.5405
34 10 0.4594
I don't know if I made it really clear, but I really need help here.
Att,
Paulo
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Linear Algebra en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!