6 views

Uploaded by Vlad Navolochny

- Trigonometry Worksheets
- Signals Matlab
- Relations
- A Computer-Aided Engineering Tool for Exterior Ballistics of Smart Projectiles
- Simplifying Trig Expressions
- Parameterization Tricks
- Cliff Notes Calculus Quick Review
- ECE633F09_HW2solutions
- All Edexcel C3 Questions (2005-2013)
- 802D_OPT
- Sum of Arctangent
- solidworks
- 2011 Level 2 Samples
- draft
- Chapter_1.pdf
- URScript_1.8
- GeomTrigStats_1.pdf
- Проектна
- SMathStudio.0_85.NumericFunctions.Article.Eng.pdf
- bpj lesson 6

You are on page 1of 7

Worksheet 1

Name: Vladislav Navolochnyy

Instructions: The solutions to these problems must be completed by the time you arrive

for the next class (Note: for Problems 1 and 2, just follow the instructions. You do not

need to have any solution for these problems.). The minimum set for this worksheet is

all problems. You must test all solutions in MATLAB. Problems 8 and 9 are also to be

submitted through the edge course site.

1. Get into MATLAB. In the Command Window, experiment with variables by doing

the following tasks in sequence:

At the prompt, type the following:

>> 4^2

Type who to see your variables at this point.

EDU>> 4^2

ans =

16

EDU>> who

Your variables are:

ans

localeStruct

Hit the up arrow. Notice that goes back to the previous command. Hit the up

arrow again to go back to the expression 4^2. Modify this (by using the left

arrow) to assign the expression to a variable called myvar.

Type who to see your variables at this point.

EDU>> myvar = 4^2

myvar =

16

EDU>> who

Your variables are:

ans

localeStruct myvar

The default variable ans can be used just like any other variable. Write an

assignment statement that will add 2 to the current value of ans.

EDU>> ans + 2

ans =

18

EDU>> clear

EDU>> who

EDU>>

EDU>> pi

ans =

3.1416

EDU>> pi = 2\15

pi =

7.5000

Now type pi again. Oops; you just wiped out the value of the built-in pi! Restore

it by typing clear pi. Now type pi again.

EDU>> pi

pi =

7.5000

EDU>> clear pi

EDU>>

2. More on helpType help by itself at the prompt to see a list of all of the help topics.

Notice that one of them is

matlab\elfun

- Elementary math

functions.

Type help elfun at the prompt to see a list of the elementary math functions.

Notice the functions under the category Rounding and remainder; youll be using some of

these for some of these problems. To find out about any of these functions, type help and

then the function name, e.g. help fix will give a description of the fix function.

Elementary math functions.

Trigonometric.

sin

- Sine.

sind

- Sine of argument in degrees.

sinh

- Hyperbolic sine.

asin

- Inverse sine.

asind

- Inverse sine, result in degrees.

asinh

- Inverse hyperbolic sine.

cos

- Cosine.

cosd

- Cosine of argument in degrees.

cosh

- Hyperbolic cosine.

acos

- Inverse cosine.

acosd

- Inverse cosine, result in degrees.

acosh

- Inverse hyperbolic cosine.

tan

- Tangent.

tand

- Tangent of argument in degrees.

tanh

- Hyperbolic tangent.

atan

- Inverse tangent.

atand

- Inverse tangent, result in degrees.

atan2

- Four quadrant inverse tangent.

atan2d

- Four quadrant inverse tangent, result in degrees.

atanh

- Inverse hyperbolic tangent.

sec

- Secant.

secd

- Secant of argument in degrees.

sech

- Hyperbolic secant.

asec

- Inverse secant.

asecd

- Inverse secant, result in degrees.

asech

- Inverse hyperbolic secant.

csc

- Cosecant.

cscd

- Cosecant of argument in degrees.

csch

- Hyperbolic cosecant.

acsc

- Inverse cosecant.

acscd

- Inverse cosecant, result in degrees.

acsch

- Inverse hyperbolic cosecant.

cot

- Cotangent.

cotd

- Cotangent of argument in degrees.

coth

- Hyperbolic cotangent.

acot

- Inverse cotangent.

acotd

- Inverse cotangent, result in degrees.

acoth

- Inverse hyperbolic cotangent.

hypot

- Square root of sum of squares.

Exponential.

exp

- Exponential.

expm1

- Compute exp(x)-1 accurately.

log

- Natural logarithm.

log1p

- Compute log(1+x) accurately.

log10

- Common (base 10) logarithm.

log2

- Base 2 logarithm and dissect floating point number.

pow2

- Base 2 power and scale floating point number.

reallog - Natural logarithm of real number.

realsqrt - Square root of number greater than or equal to zero.

sqrt

- Square root.

nthroot - Real n-th root of real numbers.

nextpow2 - Next higher power of 2.

Complex.

abs

- Absolute value.

angle

- Phase angle.

complex - Construct complex data from real and imaginary parts.

conj

- Complex conjugate.

imag

- Complex imaginary part.

real

- Complex real part.

unwrap

- Unwrap phase angle.

isreal

- True for real array.

cplxpair - Sort numbers into complex conjugate pairs.

Rounding and remainder.

fix

- Round towards zero.

floor

- Round towards minus infinity.

ceil

- Round towards plus infinity.

round

- Round towards nearest integer.

mod

- Modulus (signed remainder after division).

rem

- Remainder after division.

sign

- Signum.

EDU>> help fix

fix - Round toward zero

This MATLAB function rounds the elements of A toward zero, resulting in an array

of integers.

B = fix(A)

Reference page for fix

See also ceil, floor, round

3. Use the built-in function namelengthmax to find out the maximum number of

characters that you can have in an identifier name under your version of MATLAB.

EDU>> namelengthmax

ans =

63

4. Explore the format command in more detail. Use help format to find options.

Experiment with format bank to display dollar values.

5. Find a format option that would result in the following output format:

ans =

67/112

6. Use help elfun or experiment to answer the following questions:

Is fix(3.5) the same as floor(3.5)?

yes

EDU>> fix(3.5)

ans =

3.00

EDU>> floor(3.5)

ans =

3.00

They are the same

yes

EDU>> fix(3.4)

ans =

3.00

EDU>> fix(-3.4)

ans =

-3.00

EDU>> fix(3.2)

ans =

3.00

EDU>> floor(3.2)

ans =

3.00

No

EDU>> fix(-3.2)

ans =

-3.00

EDU>> floor(-3.2)

ans =

-4.00

Is fix(-3.2) the same as ceil(-3.2)?

7.

The function sin calculates and returns the sine of an angle in radians. Use help

elfun to find the name of the function that returns the sine of an angle in degrees. Verify

that calling this function and passing 90 degrees to it results in 1.

sind

EDU>> Y = sind(90)

Y=

1.00

8. (edge Submit Problem) A vector can be represented by its rectangular coordinates x

and y or by its polar coordinates r and . The relationship between them is given by

the equations:

x = r * cos()

y = r * sin()

Assign values for the polar coordinates to variables r and theta. Then, using these

values, assign the corresponding rectangular coordinates to variables x and y.

9. (edge Submit Problem) Find MATLAB expressions for the following

19

31.2

tan()

10. Look at the Class 1 Commands and Functions, and make sure that you understand

everything and play around with all of the functions listed! You are responsible for

understanding all of these functions.

- Trigonometry WorksheetsUploaded bytutorciecleteam
- Signals MatlabUploaded byGasser Alaa Eldien
- RelationsUploaded byGraham Moore
- A Computer-Aided Engineering Tool for Exterior Ballistics of Smart ProjectilesUploaded byyarara
- Simplifying Trig ExpressionsUploaded bytutorciecleteam
- Parameterization TricksUploaded byAhmed Akhbar
- Cliff Notes Calculus Quick ReviewUploaded byEthan Em
- ECE633F09_HW2solutionsUploaded byGabrielPopoola13
- All Edexcel C3 Questions (2005-2013)Uploaded by4yaz
- 802D_OPTUploaded bybhagwan_saini
- Sum of ArctangentUploaded byJoseph Quarcoo
- solidworksUploaded byprasenjitsayantan
- 2011 Level 2 SamplesUploaded byiitforum
- draftUploaded byapi-399130340
- Chapter_1.pdfUploaded byanandintel
- URScript_1.8Uploaded byMarkus Mano
- GeomTrigStats_1.pdfUploaded bygozamen
- ПроектнаUploaded byAnonymous lap3RB
- SMathStudio.0_85.NumericFunctions.Article.Eng.pdfUploaded bypiramidon
- bpj lesson 6Uploaded byapi-307093352
- bpj lesson 6Uploaded byapi-307095258
- LimitLaws (1calUploaded byMHS Gameplays “MHS GAMPLAYS”
- HyperbolicUploaded bysupravat chhatait
- 08&9Uploaded bykamal hameed tayy
- 3_complexnumbersUploaded byMahtab Alam
- Polar_Plots_Manual.pdfUploaded byPatricio Castillo Manquecoy
- calg t7 2Uploaded byapi-261379705
- 1 Function Enrichment PDF August 14 2009Uploaded byTan KIm HAn
- Chapter-22.pdfUploaded byVasim Mansuri
- problems1fourierUploaded byRenato Tello

- MATLAB Summary.docxUploaded byshreedharkolekar
- SCILAB Elementary FunctionsUploaded byMAnohar Kumar
- cordicUploaded byEmre Yılmaz
- JMT Users ManualUploaded byFromy Alex
- 2. RocketScience.pdfUploaded byAugusto
- fx-95MS_500MS_ENUploaded byDanny Nguyen
- Mat Lab for Sci Lab UsersUploaded byDeepank Ch
- 4024 Syllabus 2017Uploaded byRida Snob
- WIS21_22AILEARNINGGUIDE2017_Sem2.pdfUploaded byAnonymous WwecnEoOIt
- Fx-100AU PLUS en Manual BookUploaded byafatonys
- Using GnuplotUploaded byWilliam Agudelo
- Matlab PrimerUploaded byMelih Tok
- BAB08 - The Math Operations LibraryUploaded bycakMAD69
- 4040_y11_syUploaded byAzlan Munir
- Functions and Graphs IntmathUploaded bysmeena
- Uc Ls Math ParserUploaded bythanhha34
- Matlab Brief GuideUploaded byPrateek Thakur
- List of LaTeX Mathematical Symbols - OeisWikiUploaded bymohan
- Nearing - MechanicsUploaded bybdefelis
- Tutorial 1Uploaded byAswad TonTong
- tutoriuMupadUploaded byJulio Cesar Barraza Bernaola
- 6_2Uploaded bytietsdeux
- Qucs Tutorial FunctionsUploaded byAlessio Cacciatori
- 6 2 Hyperbolic FunctionsUploaded byEbookcraze
- Hiperbolic FuntionUploaded byLorran Neumann
- Astro SoftwareUploaded byAli Basmaci
- manualv2Uploaded byHenry Hurtado
- Latex Math SymbolsUploaded byvagver13
- Jags User ManualUploaded bypopov357
- 1mathUploaded byKhalid Green