Advertisement
Eddie_1337

sdp p1

Mar 9th, 2020
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. clc
  2. clear
  3.  
  4. x = [1 2 3 4; 0.48 0.27 0.13 0.12];
  5. if(sum(x(2, :)) == 1)
  6. med = sum(x(1, :) .* x(2, :)) / 4;
  7. med
  8. disp = (x(1, :) - med).^2 .* x(2, :);
  9. disp
  10. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement