Cody

Solution 2101249

Submitted on 21 Jan 2020 by Binbin Qi
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
coords=[0 0;1 0; 1 1; 0 1]; lnods=[ 1 2 4; 2 3 4]; y_correct =[1/3 1/3;2/3 2/3]; assert(isequal(your_fcn_name(coords,lnods),y_correct))

ans = 0.3333 0.3333 0.6667 0.6667

2   Pass
coords=[0 0;1 0; 1 1; 0 1; 0.5 0.5]; lnods=[ 1 2 5; 2 3 5;3 4 5;4 1 5]; y_correct =[1/2 1/6; 5/6 1/2 ;1/2 5/6;1/6 1/2]; assert(isequal(your_fcn_name(coords,lnods),y_correct))

ans = 0.5000 0.1667 0.8333 0.5000 0.5000 0.8333 0.1667 0.5000