Solved

please explain the output of this matlab code

Posted on 2009-04-02
1
69 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
countXY challenge 28 152
format the code in java 6 93
wordsFront challenge 8 88
WPF - Tooltips for ComboBox items 5 73
There is an easy way, in .NET, to centralize the treatment of all unexpected errors. First of all, instead of launching the application directly in a Form, you need first to write a Sub called Main, in a module. Then, set the Startup Object to th…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

777 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