Azzera filtri
Azzera filtri

Image Help with loops

1 visualizzazione (ultimi 30 giorni)
PenguinForce
PenguinForce il 2 Ott 2016
Modificato: PenguinForce il 2 Ott 2016
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!!

Risposta accettata

Image Analyst
Image Analyst il 2 Ott 2016
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 Commenti
PenguinForce
PenguinForce il 2 Ott 2016
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 il 2 Ott 2016
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!

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Loops and Conditional Statements in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by