Solved

please explain the output of this matlab code

Posted on 2009-04-02
1
66 Views
Last Modified: 2016-02-10
When I run the code below for the attached image, I was expecting a single value for a max but got a load of values I dont understand?

Can someone please explain this for me
I=imread('C:\Users\Justin\Documents\MATLAB\lab2\lightbulb', 'jpg');

    d=max(I)

Open in new window

lightbulb.jpg
0
Comment
Question by:jtiernan2008
1 Comment
 
LVL 15

Accepted Solution

by:
yuk99 earned 250 total points
ID: 24053680
No, the function calculate maximum value for each vector in the 1st dimension, means across rows. So if array I is MxNx3 you should get 1xNx3 result after MAX function. To find maximum value for the whole array do max(I(:)).
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
gHappy challenge 67 109
method notes when mouse over in eclipse 5 68
matchUp  challenge 6 48
SQL400 max size 5 54
Navigation is an important part of web design from a usability perspective. But it is often a pain when it comes to a developer’s perspective. By navigation, it often means menuing. This is less theory and more practical of how to get a specific gro…
Having just graduated from college and entered the workforce, I don’t find myself always using the tools and programs I grew accustomed to over the past four years. However, there is one program I continually find myself reverting back to…R.   So …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now