Image Help with loops

1 次查看(过去 30 天)
So I just realized that I misread the problem and was supposed to use loops to create the image values for every layer R, G and B. I have a working code but could someone please show me how I could get the same result while incorporating loops? Thank you so much!!

采纳的回答

Image Analyst
Image Analyst 2016-10-2
What do you mean misread? Is it homework? We're not supposed to just do your homework for you (so you don't get caught cheating), and if it's homework you're supposed to tag it as homework. Please read this http://www.mathworks.com/matlabcentral/answers/8626-how-do-i-get-help-on-homework-questions-on-matlab-answers
So I assume you know how to do a for loop, so give it a try.
for col = 1 : 256
for row = 1 : 256
% Code for you to finish....
end
end
  2 个评论
PenguinForce
PenguinForce 2016-10-2
This is not homework. I am trying to learn matlab on my own and I have purchased a book to help me. I am trying one ofthe problems in the book and I was trying to complete it but when I went back to read it again, I realized it said use a for loop and I was trying to rewrite my code using loops but I was struggling and beginning to give up which is why I decided to come here and ask for a way. I've been trying the for loop but it keeps giving me an error
PenguinForce
PenguinForce 2016-10-2
But thank you for the help, your suggestion helped. I was forgetting to do a for loop within a for loop. Thank you for your help!

请先登录,再进行评论。

更多回答(0 个)

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by