Lounge For casual talk about things unrelated to General Motors. In other words, off-topic stuff. And anything else that does not fit Section Description.

Help With Matlab

Old 01-12-2007, 02:50 PM
  #3  
Senior Member
Posts like a Northstar
 
Chinski's Avatar
 
Join Date: Apr 2004
Posts: 606
Likes: 0
Received 0 Likes on 0 Posts
Chinski is on a distinguished road
Default

I did not know Matlab could create images (well, besides graphs). Or do you just need a matrix to represent each one? With 1'* and 0'* maybe.
Old 01-12-2007, 03:11 PM
  #4  
Senior Member
Posts like a Northstar
 
Chinski's Avatar
 
Join Date: Apr 2004
Posts: 606
Likes: 0
Received 0 Likes on 0 Posts
Chinski is on a distinguished road
Default

I did some quick searching, Matlab uses the colors 0 through 255. 0 being the lightest, 255 being the darkest. Your matrix is the pixels. So if you draw a 5x5 grid on the first one the matrix would be like: [255 255 255 255 255; 255 0 0 0 255; 255 0 0 0 255; 255 0 0 0 255, 255 255 255 255 255] Just have to follow suit for the rest, figuring out what numbers represent the shades for the gray-scale ones. I'd use random shades of gray or random black/white for the last one. I do not remember the code exactly, but you might be able to write a formula to fill the matrix randomly for the last one.
Old 01-12-2007, 04:41 PM
  #5  
Senior Member
True Car Nut
 
95naSTA's Avatar
 
Join Date: Feb 2003
Location: Philly
Posts: 4,508
Likes: 0
Received 0 Likes on 0 Posts
95naSTA is on a distinguished road
Default

I have used matlab a bunch but never to do what your trying to do.

I'm looking it up right now in my matlab text. What version are you working with?
Old 01-12-2007, 04:43 PM
  #6  
Senior Member
Posts like a Corvette
 
Puddy46's Avatar
 
Join Date: Sep 2004
Location: Pittsburgh PA
Posts: 1,539
Likes: 0
Received 0 Likes on 0 Posts
Puddy46 is on a distinguished road
Default

Always used it for Math/Engineering purposes as well.
Have a book too, so you have 2 options now
Old 01-12-2007, 05:53 PM
  #7  
Senior Member
True Car Nut
 
95naSTA's Avatar
 
Join Date: Feb 2003
Location: Philly
Posts: 4,508
Likes: 0
Received 0 Likes on 0 Posts
95naSTA is on a distinguished road
Default

I'm still looking stuff up. For the first two it seems like you can use the pcolor function. I'm not sure about the fading images yet though.
Old 01-12-2007, 06:38 PM
  #10  
Senior Member
True Car Nut
 
95naSTA's Avatar
 
Join Date: Feb 2003
Location: Philly
Posts: 4,508
Likes: 0
Received 0 Likes on 0 Posts
95naSTA is on a distinguished road
Default

I couldn't really find anything.
Here is the pcolor function I mentioned.

Quick Reply: Help With Matlab



All times are GMT -4. The time now is 06:51 PM.