SlideShare a Scribd company logo
1 of 3
Download to read offline
Assignment # 1 
Fall 2015 
Course title: STRUCTURED COMPUTER PROGRAMMING Course #: EE201 
Sections: All 
Name: Student #: 
Start MATLAB by either double clicking over the MATLAB icon on your desktop, or by selecting: Start menu → ALL Programs → MATLAB. 
You will at least 4 windows inside MATLAB; Command Window, Workspace, Current Folder and Command History. 
If you don’t see them all, click on Layout and select Default, as shown below: 
Khaled Mohammed Ali AL-awlaqi 1324593
Q1) In MATLAB command window, type the following: 
>> x = 2.5 
>> y = 2.5; 
>> A = [ 1 3 5 7] 
>> B = [ 2; 4; 6; 8] 
>> M = [ 1 3 5 7; 2 4 6 8] 
What is the effect of the semicolon? 
Q2) Write the suitable MATLAB help command to find out how to use the following symbols and functions in MATLAB: 
Mathematical operation 
Matlab help command 
√푎 
× 
푎푏 
sin−1(푥) 
|푦| 
Hint: help is used when you know the Matlab function and lookfor is used when you don’t know the Matlab function for the given operation. 
For example: help sin 
lookfor cosine x=2.5 store and display y = 2.5; store but don't display A = [ 1 3 5 7] store and display B = [ 2; 4; 6; 8] store but don't display M = [ 1 3 5 7; 2 4 6 8]store but don't display 
lookfor power 
lookfor multiply 
sqrt 
asin 
abs
Q3) Use MATLAB to compute the following mathematical expressions: 
Mathematical Expression 
MATLAB form 
Result 
푞= 2휋−5.4√3+√73 
푎= log10(123)− −34+12⁄ 
푊=1.5; 푟= cos−1푊+90√|2푊−푊2| 
푧= tan23휋 23+cos60° 
푘= 푐+푎 푏 푏+2푎 +푐 
Where a = 4; b = 5; c = -2; 
푚=104×ln푒√33 
푥=1;푦= −2 푛= sin(휋푥)22+푦2푥 
4+7푖 √|9−3푖| 
>>q=(2*pi-5.4)/sqrt(3)+7^(1/3) 
>>w=1.5; 
>> r=(acos(w)+90)/sqrt(abs(2*w-w^2)) 
>> a=log10(12^3)-(-3/4+(1/2)) 
>> z=(tan(3*pi/2))^2/3+cosd(60) 
m=10^4*log(exp(sqrt(33))) 
>>a=4; 
>> b=5; 
>> c=-2; 
>> k=(c+a)/b/(b+2*a)+c 
>>x=1; 
>> y=-2; 
>> n=sin(pi*x)^2/(2+y^(2*x)) 
>> b=(4+7i)/sqrt(abs(9-3i))

More Related Content

What's hot

Team AAA Pitch - Deeptech AI Hackathon
Team AAA Pitch - Deeptech AI HackathonTeam AAA Pitch - Deeptech AI Hackathon
Team AAA Pitch - Deeptech AI HackathonMatthias Schedel
 
Seminar 2 coding_principles
Seminar 2 coding_principlesSeminar 2 coding_principles
Seminar 2 coding_principlesmoduledesign
 
Ex1 d sketchlinfuncs
Ex1 d sketchlinfuncsEx1 d sketchlinfuncs
Ex1 d sketchlinfuncsgiovanniL
 
ANN ARIMA Hybrid Models for Time Series Prediction
ANN ARIMA Hybrid Models for Time Series PredictionANN ARIMA Hybrid Models for Time Series Prediction
ANN ARIMA Hybrid Models for Time Series PredictionM Baddar
 
Assignment problem
Assignment problemAssignment problem
Assignment problemRafidahAli1
 
Code Efficiency (Nur Nachman)
Code Efficiency (Nur Nachman)Code Efficiency (Nur Nachman)
Code Efficiency (Nur Nachman)NurNachman
 
Matlab simulation project
Matlab simulation projectMatlab simulation project
Matlab simulation projectAssignmentpedia
 
Please show a screenshot of the code. Thank you. Solve the function F= 25x^2...
Please show a screenshot of the code. Thank you.  Solve the function F= 25x^2...Please show a screenshot of the code. Thank you.  Solve the function F= 25x^2...
Please show a screenshot of the code. Thank you. Solve the function F= 25x^2...hwbloom3
 
Assignment method
Assignment methodAssignment method
Assignment methodR A Shah
 
Matlab - Introduction and Basics
Matlab - Introduction and BasicsMatlab - Introduction and Basics
Matlab - Introduction and BasicsTechsparks
 
lesson plan 1 maya 3
lesson plan 1 maya 3lesson plan 1 maya 3
lesson plan 1 maya 3Max Friel
 
Simplified Scala Monads And Transformation - Harmeet Singh (Knoldus Inc.)
Simplified Scala Monads And Transformation - Harmeet Singh (Knoldus Inc.)Simplified Scala Monads And Transformation - Harmeet Singh (Knoldus Inc.)
Simplified Scala Monads And Transformation - Harmeet Singh (Knoldus Inc.)Tech Triveni
 
Matlab introduction
Matlab introductionMatlab introduction
Matlab introductionssuser2797e4
 
ECET350 Week 3 Homework Assignment
ECET350 Week 3 Homework AssignmentECET350 Week 3 Homework Assignment
ECET350 Week 3 Homework AssignmentBirleRubin
 

What's hot (18)

Team AAA Pitch - Deeptech AI Hackathon
Team AAA Pitch - Deeptech AI HackathonTeam AAA Pitch - Deeptech AI Hackathon
Team AAA Pitch - Deeptech AI Hackathon
 
Seminar 2 coding_principles
Seminar 2 coding_principlesSeminar 2 coding_principles
Seminar 2 coding_principles
 
Ex1 d sketchlinfuncs
Ex1 d sketchlinfuncsEx1 d sketchlinfuncs
Ex1 d sketchlinfuncs
 
ANN ARIMA Hybrid Models for Time Series Prediction
ANN ARIMA Hybrid Models for Time Series PredictionANN ARIMA Hybrid Models for Time Series Prediction
ANN ARIMA Hybrid Models for Time Series Prediction
 
17 Jo P May 08
17 Jo P May 0817 Jo P May 08
17 Jo P May 08
 
Assignment problem
Assignment problemAssignment problem
Assignment problem
 
Matlab summary
Matlab summaryMatlab summary
Matlab summary
 
Matlab
MatlabMatlab
Matlab
 
Code Efficiency (Nur Nachman)
Code Efficiency (Nur Nachman)Code Efficiency (Nur Nachman)
Code Efficiency (Nur Nachman)
 
Matlab simulation project
Matlab simulation projectMatlab simulation project
Matlab simulation project
 
Please show a screenshot of the code. Thank you. Solve the function F= 25x^2...
Please show a screenshot of the code. Thank you.  Solve the function F= 25x^2...Please show a screenshot of the code. Thank you.  Solve the function F= 25x^2...
Please show a screenshot of the code. Thank you. Solve the function F= 25x^2...
 
bpmn. Quadratic equation
bpmn. Quadratic equationbpmn. Quadratic equation
bpmn. Quadratic equation
 
Assignment method
Assignment methodAssignment method
Assignment method
 
Matlab - Introduction and Basics
Matlab - Introduction and BasicsMatlab - Introduction and Basics
Matlab - Introduction and Basics
 
lesson plan 1 maya 3
lesson plan 1 maya 3lesson plan 1 maya 3
lesson plan 1 maya 3
 
Simplified Scala Monads And Transformation - Harmeet Singh (Knoldus Inc.)
Simplified Scala Monads And Transformation - Harmeet Singh (Knoldus Inc.)Simplified Scala Monads And Transformation - Harmeet Singh (Knoldus Inc.)
Simplified Scala Monads And Transformation - Harmeet Singh (Knoldus Inc.)
 
Matlab introduction
Matlab introductionMatlab introduction
Matlab introduction
 
ECET350 Week 3 Homework Assignment
ECET350 Week 3 Homework AssignmentECET350 Week 3 Homework Assignment
ECET350 Week 3 Homework Assignment
 

Viewers also liked

02 atiqa ijaz khan 01
02 atiqa ijaz khan 0102 atiqa ijaz khan 01
02 atiqa ijaz khan 01Atiqa khan
 
02 atiqa ijaz khan 02
02 atiqa ijaz khan 0202 atiqa ijaz khan 02
02 atiqa ijaz khan 02Atiqa khan
 
02 atiqa ijaz khan 03
02 atiqa ijaz khan 0302 atiqa ijaz khan 03
02 atiqa ijaz khan 03Atiqa khan
 
Applied statistics and probability for engineers solution montgomery && runger
Applied statistics and probability for engineers solution   montgomery && rungerApplied statistics and probability for engineers solution   montgomery && runger
Applied statistics and probability for engineers solution montgomery && rungerAnkit Katiyar
 
Vapourcompressionrefrigeration 140614054320-phpapp02 (1)
Vapourcompressionrefrigeration 140614054320-phpapp02 (1)Vapourcompressionrefrigeration 140614054320-phpapp02 (1)
Vapourcompressionrefrigeration 140614054320-phpapp02 (1)Jagadeesan Jaga
 
The mother we share - lyrics planning
The mother we share - lyrics planningThe mother we share - lyrics planning
The mother we share - lyrics planningSurajramm98
 
"Parla con Noi" - Realizzazione di un format televisivo
"Parla con Noi" - Realizzazione di un format televisivo"Parla con Noi" - Realizzazione di un format televisivo
"Parla con Noi" - Realizzazione di un format televisivoFlavia Zunino
 
Prezentaciya vchitelya matematiki_chervonec_inni_oleksandrivni
Prezentaciya vchitelya matematiki_chervonec_inni_oleksandrivniPrezentaciya vchitelya matematiki_chervonec_inni_oleksandrivni
Prezentaciya vchitelya matematiki_chervonec_inni_oleksandrivnisviridovane
 
An pham day hoc du an
An pham day hoc du anAn pham day hoc du an
An pham day hoc du anViet_Anh_0709
 
Rencana pelaksanaan pembelajaran 2013
Rencana pelaksanaan pembelajaran 2013 Rencana pelaksanaan pembelajaran 2013
Rencana pelaksanaan pembelajaran 2013 ahmad akhyar
 

Viewers also liked (20)

EE201_Assignment3
EE201_Assignment3EE201_Assignment3
EE201_Assignment3
 
EE201_Assignment4
EE201_Assignment4EE201_Assignment4
EE201_Assignment4
 
02 atiqa ijaz khan 01
02 atiqa ijaz khan 0102 atiqa ijaz khan 01
02 atiqa ijaz khan 01
 
02 atiqa ijaz khan 02
02 atiqa ijaz khan 0202 atiqa ijaz khan 02
02 atiqa ijaz khan 02
 
02 atiqa ijaz khan 03
02 atiqa ijaz khan 0302 atiqa ijaz khan 03
02 atiqa ijaz khan 03
 
Applied statistics and probability for engineers solution montgomery && runger
Applied statistics and probability for engineers solution   montgomery && rungerApplied statistics and probability for engineers solution   montgomery && runger
Applied statistics and probability for engineers solution montgomery && runger
 
Laut lepas 04
Laut lepas 04Laut lepas 04
Laut lepas 04
 
Launching
LaunchingLaunching
Launching
 
Vapourcompressionrefrigeration 140614054320-phpapp02 (1)
Vapourcompressionrefrigeration 140614054320-phpapp02 (1)Vapourcompressionrefrigeration 140614054320-phpapp02 (1)
Vapourcompressionrefrigeration 140614054320-phpapp02 (1)
 
The mother we share - lyrics planning
The mother we share - lyrics planningThe mother we share - lyrics planning
The mother we share - lyrics planning
 
"Parla con Noi" - Realizzazione di un format televisivo
"Parla con Noi" - Realizzazione di un format televisivo"Parla con Noi" - Realizzazione di un format televisivo
"Parla con Noi" - Realizzazione di un format televisivo
 
EDWARD ASKEW DJCV
EDWARD ASKEW DJCVEDWARD ASKEW DJCV
EDWARD ASKEW DJCV
 
Prezentaciya vchitelya matematiki_chervonec_inni_oleksandrivni
Prezentaciya vchitelya matematiki_chervonec_inni_oleksandrivniPrezentaciya vchitelya matematiki_chervonec_inni_oleksandrivni
Prezentaciya vchitelya matematiki_chervonec_inni_oleksandrivni
 
Gig26
Gig26Gig26
Gig26
 
Presentation5
Presentation5Presentation5
Presentation5
 
Lamp on stand
Lamp on standLamp on stand
Lamp on stand
 
An pham day hoc du an
An pham day hoc du anAn pham day hoc du an
An pham day hoc du an
 
ApoOrv Garg_Resume_2015
ApoOrv Garg_Resume_2015ApoOrv Garg_Resume_2015
ApoOrv Garg_Resume_2015
 
Rencana pelaksanaan pembelajaran 2013
Rencana pelaksanaan pembelajaran 2013 Rencana pelaksanaan pembelajaran 2013
Rencana pelaksanaan pembelajaran 2013
 
Bad Effects of Worrying
Bad Effects of WorryingBad Effects of Worrying
Bad Effects of Worrying
 

Similar to Assignment1

Similar to Assignment1 (20)

Matlab practical and lab session
Matlab practical and lab sessionMatlab practical and lab session
Matlab practical and lab session
 
matlabchapter1.ppt
matlabchapter1.pptmatlabchapter1.ppt
matlabchapter1.ppt
 
Matlab introduction
Matlab introductionMatlab introduction
Matlab introduction
 
Intro to Matlab + GUI
Intro to Matlab + GUIIntro to Matlab + GUI
Intro to Matlab + GUI
 
MATLAB Basics-Part1
MATLAB Basics-Part1MATLAB Basics-Part1
MATLAB Basics-Part1
 
Matlab Tutorial.ppt
Matlab Tutorial.pptMatlab Tutorial.ppt
Matlab Tutorial.ppt
 
Matlab anilkumar
Matlab  anilkumarMatlab  anilkumar
Matlab anilkumar
 
MATLAB Workshop yugjjnhhasfhlhhlllhl.pptx
MATLAB Workshop yugjjnhhasfhlhhlllhl.pptxMATLAB Workshop yugjjnhhasfhlhhlllhl.pptx
MATLAB Workshop yugjjnhhasfhlhhlllhl.pptx
 
Mmc manual
Mmc manualMmc manual
Mmc manual
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
 
Matlab ch1 intro
Matlab ch1 introMatlab ch1 intro
Matlab ch1 intro
 
Image processing
Image processingImage processing
Image processing
 
From zero to MATLAB hero: Mastering the basics and beyond
From zero to MATLAB hero: Mastering the basics and beyondFrom zero to MATLAB hero: Mastering the basics and beyond
From zero to MATLAB hero: Mastering the basics and beyond
 
presentation.pptx
presentation.pptxpresentation.pptx
presentation.pptx
 
Basic of octave matlab programming language
Basic of octave matlab programming languageBasic of octave matlab programming language
Basic of octave matlab programming language
 
Matlab
MatlabMatlab
Matlab
 
Introduction to Matlab.ppt
Introduction to Matlab.pptIntroduction to Matlab.ppt
Introduction to Matlab.ppt
 
Raushan's MATLB PPT..pptx
Raushan's MATLB PPT..pptxRaushan's MATLB PPT..pptx
Raushan's MATLB PPT..pptx
 
Matlab introduction
Matlab introductionMatlab introduction
Matlab introduction
 
Palm m3 chapter1b
Palm m3 chapter1bPalm m3 chapter1b
Palm m3 chapter1b
 

Assignment1

  • 1. Assignment # 1 Fall 2015 Course title: STRUCTURED COMPUTER PROGRAMMING Course #: EE201 Sections: All Name: Student #: Start MATLAB by either double clicking over the MATLAB icon on your desktop, or by selecting: Start menu → ALL Programs → MATLAB. You will at least 4 windows inside MATLAB; Command Window, Workspace, Current Folder and Command History. If you don’t see them all, click on Layout and select Default, as shown below: Khaled Mohammed Ali AL-awlaqi 1324593
  • 2. Q1) In MATLAB command window, type the following: >> x = 2.5 >> y = 2.5; >> A = [ 1 3 5 7] >> B = [ 2; 4; 6; 8] >> M = [ 1 3 5 7; 2 4 6 8] What is the effect of the semicolon? Q2) Write the suitable MATLAB help command to find out how to use the following symbols and functions in MATLAB: Mathematical operation Matlab help command √푎 × 푎푏 sin−1(푥) |푦| Hint: help is used when you know the Matlab function and lookfor is used when you don’t know the Matlab function for the given operation. For example: help sin lookfor cosine x=2.5 store and display y = 2.5; store but don't display A = [ 1 3 5 7] store and display B = [ 2; 4; 6; 8] store but don't display M = [ 1 3 5 7; 2 4 6 8]store but don't display lookfor power lookfor multiply sqrt asin abs
  • 3. Q3) Use MATLAB to compute the following mathematical expressions: Mathematical Expression MATLAB form Result 푞= 2휋−5.4√3+√73 푎= log10(123)− −34+12⁄ 푊=1.5; 푟= cos−1푊+90√|2푊−푊2| 푧= tan23휋 23+cos60° 푘= 푐+푎 푏 푏+2푎 +푐 Where a = 4; b = 5; c = -2; 푚=104×ln푒√33 푥=1;푦= −2 푛= sin(휋푥)22+푦2푥 4+7푖 √|9−3푖| >>q=(2*pi-5.4)/sqrt(3)+7^(1/3) >>w=1.5; >> r=(acos(w)+90)/sqrt(abs(2*w-w^2)) >> a=log10(12^3)-(-3/4+(1/2)) >> z=(tan(3*pi/2))^2/3+cosd(60) m=10^4*log(exp(sqrt(33))) >>a=4; >> b=5; >> c=-2; >> k=(c+a)/b/(b+2*a)+c >>x=1; >> y=-2; >> n=sin(pi*x)^2/(2+y^(2*x)) >> b=(4+7i)/sqrt(abs(9-3i))