Write a script that will create a colormap that just has two colors: white and black. The script will then create a 50x50 image matrix in which each element is randomly either w
belongs to book: MATLAB: A Practical Introduction to Programming and Problem Solving|Stormy Attaway|Fourth Edition| Chapter number:13| Question number:6.13
All Answers
total answers (1)
Answer 1/
Ch13Ex6.m
bwmap = [0 0 0; 1 1 1];
colormap(bwmap)
mat = randi(2,50);
subplot(1,2,1)
image(mat)
title('Yin')
subplot(1,2,2)
yang = ~(mat - 1);
image(yang)
title('Yang')
Answer 2/
1.5
need an explanation for this answer? contact us directly to get an explanation for this answer