Info
Questa domanda è chiusa. Riaprila per modificarla o per rispondere.
Please Help! Unable to perform assignment because the left and right sides have a different number of elements. Assignment is to color the inside of the star a random color.
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
img2=imread(''wingding-star.jpg');
subplot(1,2,1);imshow(img2);
red=img2(:,:,1);
green=img2(:,:,2);
blue=img2(:,:,3);
%Task 1A take white pixels and make them into random color
%Generate random number
rng(0,'twister');
a=0;
b=255;
random=(b-a).*rand(1000,1)+a;
%capture all white pixels
wpixels=red==255&green==255&blue==255;
%make white pixels random
red(wpixels)=random;
blue(wpixels)=random;
green(wpixels)=random;
rgbImage=cat(3,red,green,blue);
subplot(1,2,2);imshow(rgbImage);
1 Commento
Risposte (0)
Questa domanda è chiusa.
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!