{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

matlabIntro22011

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

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

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

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

View Full Document
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) “
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• 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.

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

• 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.

Dana University of Pennsylvania ‘17, Course Hero Intern

• 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.

Jill Tulane University ‘16, Course Hero Intern