{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

matlabIntro22011 - Introduction to Matlab II for MAP 4103...

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

View Full Document Right Arrow Icon
Introduction to Matlab, II for MAP 4103, Mathematical Modelling I, Spring 2011 Xin Li Department of Mathematics University of Central Florida Matlab is indeed a programming language. It is an advanced programming language in the sense that its syntax is very much like human language. Un- like other programming language like FORTRAN, PASCAL, LISP, BASIC, C, C++, ..., Matlab is interactive like a hand-held calculator. No compiling is required! Here is an example of a simple Matlab program referred to as script in Matlab. function y=aq(a,q,n) %This function calculates (a;q)_n=(1-a)(1-aq)...(1-aq^{n-1}) %Inputs: a -- any real number % q -- a number between 0 and 1 % n -- a positive integer %Author: Xin Li %Version: 1.0 %Comments: This function is built for the study of q-Airy % function and its partial sums y=1; %initial value of the product qi=1; %initial value for the power of q for i=1:n y=y*(1-a*qi); qi=qi*q; end Do not worry too much about what the program does for the moment. Let’s make sure we understand all the individual parts first. 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
A Detailed Explanation. The program starts with the keyword “function” followed by an “equality”. Of course this is not your usual equality. It is a declaration! Or a statement. Here’s its meaning: (i) “
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