CS 170A Discussion 1 handout

CS 170A Discussion 1 handout - Spring 2010 Mathematical...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Elaine Wah CS 170A: Discussion 1 Wednesday, March 31, 2010 TA: Elaine Wah Email: ewah@cs.ucla.edu (please include CS 170A in the subject line) Office hours: TBA, tentatively Wed. 12-1pm, Thurs. 11:30am-12:30pm ( or by appointment ) Office: 4428 Boelter Hall MATLAB , which stands for “MATrix LABoratory,” is a numerical computing environment. The MATLAB language is interpreted, not compiled. You can execute MATLAB code at the prompt ( >> ) in the Command Window, or you can save sequences of commands in a text file by using the MATLAB Editor. Current active variables are visible in the MATLAB Workspace. 1. Basic MATLAB syntax % This is a comment in MATLAB % Note that ans is a temporary variable that records the output of % the last statement executed >> 1+1 ans = 2 >> 1+1; % output is suppressed when ; is added 2. Using MATLAB as a calculator >> pi ans = 3.1416 >> 2^5 ans = 32 3. Variables Variables in MATLAB can generally be assigned without declaring their type. To print the
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/05/2010 for the course CS M117 taught by Professor Dzhanidze during the Spring '09 term at UCLA.

Page1 / 3

CS 170A Discussion 1 handout - Spring 2010 Mathematical...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online