Recitation_Study_Guide

# Recitation_Study_Guide - end %% Recitation 2 % Problem 2...

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

%% Recitation 1 % Problem 1 5+2^2+4 %% Problem 2 clear;clc matlabvariable=453-4^3; matlabvariable=matlabvariable+15 %% Problem 5 a='matlab' b='m' %% Problem 6 x='hello' y=15 z=22 d=342.42 whos clear d; %% Problem 7 x=56 y=87 tempt=x x=y y=temp %% Problem 9 x=456 y=187 z=12 temp=x x=y y=z z=temp %% Problem 10 5^2*3 5^(2*3) (1+3+5)/(5+3+1) %% Problem 11 (2+3^4)^(1/2) (2+3^4)^(.5) sqrt((2+3^4)) %% Problem 12 r=10 circumference=pi*(2*r) area=pi*r^2 %% Problem 13 x=15;y=22;z=35; x>22|y>22 %% Problem 14 (5^(2+1))/(4-1) (5+6*(7/3)-2^2)/((2/3)*(3/(3*6))) %% Problem 15 age=18 if (age>=21) disp('You can drink legally now!') else disp('No underage drinking!!!')

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: end %% Recitation 2 % Problem 2 v1=2:2:18 v2 = transpore(1:4:29) A=zeros(3) %% Problem 3 z=ones(3,4)*pi [r c]=size(z) z(2,:)=-pi sin(z) %% Problem 4 2+roung(6/9+3*2)/2-3 3^2+ceil(6/9+3)/2-3 3^2+floor(6/9+3)/2-3 3^2+FIX(6/9+3)/2-3 %% Problem 5 x=input('enter a number'); if(rem(x,2)==0) disp('even') else disp('odd') end %% Problem 6 x=input('Enter a number') if (x&gt;=0) disp(sqrt(x)) else disp('x is negative') end %% Problem 7 x=15.6; if (fix(x)==x) disp('x is an integer') else disp('x is not an integer') end %% Problem 8...
View Full Document

## This note was uploaded on 10/27/2011 for the course BIO 101 taught by Professor Martin during the Spring '08 term at Rutgers.

### Page1 / 2

Recitation_Study_Guide - end %% Recitation 2 % Problem 2...

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

View Full Document
Ask a homework question - tutors are online