{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

ds1 - ECE 178 Digital Image Processing Discussion Session#1...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
ECE 178 Digital Image Processing Discussion Session #1 Mehmet Emre Sargin [email protected] January 12, 2007 Exercise: 1 Suppose A = 1 2 3 4 5 6 (1) In order to initialize A as stated above type >> A = [ 1 2 3;4 5 6 ] A = 1 2 3 4 5 6 The semicolon is used for suppressing the output. If you do not want to suppress the output, just ignore the semicolon at the end (Be careful when dealing with large arrays i.e. images). Warning! Remember, in Matlab you can not start a variable or a function or even a script name with a number. 1.m invalid question1.m valid 1
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
DS#1 ECE 594N Mehmet Emre Sargin [email protected] Exercise: 2 First indices are for accessing rows and the second indices are for accessing columns. In order to access whole row or column, colon is used. >> A(2,3) ans = 6 >> A(:,1) ans = 1 4 >> A(1,:) ans = 1 2 3 You can access the elements of an array also by specifying a single index A ( i, j ) A ( i + r ( j - 1)). Where r is the number of rows in A .
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern