Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >> [x y] = meshgrid(30:-10:0)
- >> A = [[1, 0.5, 0.2, 0.1], [0.5, 1, 0.6, 0.3], [0.2, 0.6, 1, 0.8], [0.1, 0.3, 0.8, 1]];
- >> surf(x,y,A)
- >> shading interp
- +
- >> clear
- >> [x y] = meshgrid(30:-10:0)
- >> z = exp(-0.2.*(x-y).^2)
- >> surf(x,y,z)
- >> shading interp
- +
- >> bar3(A);
- +
- >> clear
- >> [x y] = meshgrid(30:-10:0)
- >> B = [[0, 0.2, 0.6, 1], [0, 0, 0.2, 0.6], [0, 0, 0, 0.2], [0, 0, 0, 0]]
- >> surf(x,y,B)
- >> shading interp
- +
- >> for i = 1:1:4
- for j = 1:1:4
- if x(i,j) >= y(i,j)
- alfa(i,j) = 0;
- else
- alfa(i,j) = 1/(1+(5/(x(i,j)-y(i,j))^4));
- end
- end
- end
- >> surf(x,y,alfa)
- >> shading interp
- +
- >> bar3(B);
- +
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement