Attribution Non-Commercial (BY-NC)

10 views

Attribution Non-Commercial (BY-NC)

- Robot Control Through Gestures
- Car Number Plate Recognition
- cam and Follower.pdf
- Build Gui
- electrical computer application lesson 5
- SciLab Intro
- Bods Scripting
- Matlab Programming Assignment 2014 Civil Engineering
- Mat Basics
- Matlab for Psychologists
- Introduction to Matlab-18s
- Matlab Study
- Lecture 07
- Matlab Tutorial
- 03 Simulink Basic
- Matlab Tutorial
- apc-flyer
- Advanced Image Processing With Matlab
- BS Lab_Demo
- TMSC6713DSK Using MATLAB

You are on page 1of 2

1, omitting the switch statement Upload one M-file per problem unless instructed otherwise.

Problems from your text: none this time Additional problems: HW3_1: Repeat problem HW2_5, but modify it to work for a 2D vector as well. Add input validation: if the input array does not contain two or three items, return an error message, using error. Hint: numel could be helpful. HW3_2. All the rides in a state-of-the-art amusement park contain biometric sensors that measure data about potential riders while they are standing in line. Assume the sensors can detect a riders age, weight, heart problems and possible pregnancy. For each ride at the park, help the engineers write the conditional statements based on the safety specifications:

a)The Spinning Beast: All riders must be 17 years or older, more than 62 inches tall, and must not be pregnant or have a heart condition if ________ ; disp(Sorry you cannot ride the Spinning Beast); end b)The Lame Train: All riders must be 8 years or older and must not be pregnant if ________ ; disp(Sorry, you cannot ride the Lame Train); end c) The MATLAB House of Horrors: All riders must be 17 years or older and must not have a heart condition if_________ ; disp (Welcome to the MATLAB House of Horrors!); end d) The Neck Snapper: All riders must be 16 years or older, more than 65 inches tall, must not be pregnant or have a heart condition if_________ ; disp(Welcome to the Neck Snapper); end Variable definitions: age, height, weight: all integers. Heart condition (HC) and pregnancy (p), both Boolean(1 if heart condition, 0 if not; 1 if pregnant, 0 if not) Place the code for all of these in one script M-file. To test the script file, try entering the following in your workspace & running the file. Try other combinations on your own to make sure it works.

>>age=14; height=60; HC=0; p=0; %does this cause an error? Generates Spin. Beast msg >>age=18; height=66; weight=130; HC=0; p=1; %Generates LT, SB & MATLAB msgs >>age=55; height=72; weight=200; HC=0; p=0; %Generates MATLAB & Neck Snapper msgs

HW3_3: The speed limit on many Texas highways is 70 mph in the daytime & 65 at night. Write a MATLAB function that will display the message speeding to the screen when the vehicle is speeding. There should be 2 input arguments to the function: the vehicles speed, and a day/night indicator (day=1, night=0) For example: >> speeder(68,0) speeding

ME2315 Computer-Aided Analysis, Spring 2011 HW #3 due 2/7/2011 2 of 2 HW3_4 Predict what will appear in the command window when the following MATLAB code is executed. Verify the results in MATLAB. Copy each block of code into an M-file and for each case, set values of A&B so that the different results will occur than what is shown below.

HW3_5 Write code that it does the following: if A=5 & B<2, then B is assigned its current value divided by two. If A = 5 & B 2, then B is assigned two times its current value. Otherwise there is no change to the value of B. Test with A=5; B=1, A=6;B=2, A=5;B=2; A=6;B=1. Upload the correct code, with all four test cases. HW3_6 Predict what will appear in the command window when the following MATLAB code is executed. Write your work in comments and run the code to verify the results in MATLAB. The first one is done for you. See figure 3.1 in your book. x=3;y=6;z=-3; x<3 && y<6 %(3<3) && (6<6) => 0 && 0 => 0 x<3 || y<6 (x<y) && (y<z) || (z<x) x<y && (y<z || z<x) x>-1*z ~(y>=x*3)&& ~(y<=z*3) ~((y>=x*3)&& (y<=z*3)) z<x<y (-1*y)<z<0 HW3_7 Write MATLAB code two different ways to test for the following condition: A is between the values of 10 and 20, exclusive. Test them with A=9,10,11,19,20,21. Upload correct code & test cases in a script M-file. HW3_8 A piecewise function is useful when the relationship between a dependent and independent variable cannot be adequately described with a single equation. Write a MATLAB function to evaluate f(x) for any scalar input x. Why cant we evaluate for array input x? Include input validation to generate an error message for non-scalar input, and when f(x) is undefined (use error). Create a script M-file that sets different values of x as input to your function to test all four cases. (similar to problem HW2_4) Upload the script M-file & the function M-file

3x +12 3 f (x) = 6x x 2 undefined 4 x 3 3 x 3 3 x 6 x < 4;x > 6

- Robot Control Through GesturesUploaded byAmit Huda
- Car Number Plate RecognitionUploaded bySudheer Goud
- cam and Follower.pdfUploaded byManivannan Jeeva
- Build GuiUploaded byNgô Đăng Minh
- electrical computer application lesson 5Uploaded byWang Sol
- SciLab IntroUploaded bykcshieh
- Bods ScriptingUploaded byLakshmi P
- Matlab Programming Assignment 2014 Civil EngineeringUploaded byPayel Dutta
- Mat BasicsUploaded byShashi Gururani
- Matlab for PsychologistsUploaded byAvinash Nandakumar
- Introduction to Matlab-18sUploaded bydonya_haghighi
- Matlab StudyUploaded byecstacy007
- Lecture 07Uploaded byslimane1
- Matlab TutorialUploaded byBrian Sanchez
- 03 Simulink BasicUploaded bySrinivas Cheruku
- Matlab TutorialUploaded byAn HolyMan
- apc-flyerUploaded by김형진
- Advanced Image Processing With MatlabUploaded byks_pro
- BS Lab_DemoUploaded byRavi Babu Ayyalwar
- TMSC6713DSK Using MATLABUploaded byNishantKumar
- 03nonparametrik2Uploaded byFadli Wardana
- Call Trace AnalyserUploaded byKishlay Kr
- Plotting Functions - MATLAB & Simulink - MathWorks India.pdfUploaded bykumarshantanu579
- Matlab NN ToolboxUploaded bynilton_9365611
- 23 Sample ChapterUploaded bymdaashu
- Control Engineering Lab Manual part 1Uploaded byUmerShahzadQurashi
- Clase MatlabUploaded byFelipe Gutierrez
- Introduction to MATLAB with Image ProcessingUploaded byبيكرام سينغ
- Matlab IntroductionUploaded byPinaki Biswas
- tugas 7.pdfUploaded byMUHAMAD MAULANA IKSAN

- AU100 AutoContinuum Systems EnglishUploaded byflounder33
- 871fm-User Manual Inductive Sensor IO link.pdfUploaded byflounder33
- Power Step Product CatalogueUploaded byflounder33
- PE Mech Machine Apr 2017Uploaded byflounder33
- Pressure in SI EngineUploaded byflounder33
- Relative Resource ManagerUploaded byflounder33
- CH10Uploaded byflounder33

- At CommandsUploaded bysaadawar
- Cs 604 Recent SolvedUploaded bychi
- db2pdUploaded byCKEITH14
- Background of the StudyUploaded byFlorlyn Sudio Cabang Remegio
- Another Bill Gates EssayUploaded byfreefromfakes
- How to Wire an Arduino Based 3 Axis CNC MachineUploaded byMokhamad Iqbal
- Freq Planning ExerciseUploaded byNate Amoo
- send_ir_adv_6000_8000-smUploaded byAndrey Khodanitski
- Fsdgd Fsdgd Fsdgd Fsdgd Fsdgd Fsdgd Fsdgdfsdf Dsffasfs Sdfsd FsdUploaded byHernan Huw
- DS1104Uploaded byEyob T. Biratu
- ASIC Verification_ FIFOUploaded byprodip7
- Performance Scale Time in Traffic ModelsUploaded bygribbler
- 900 55 013 C 1108 Joint to Facade on a Balcony NewUploaded byElida Rondić
- CTS_PlacementPapersUploaded byKarthi Keyan
- Age3RMmongolia.dmpUploaded byCypry Schmitz
- BI Products-Comparison.xlsxUploaded bysharpan5
- Class 11 Structure Sumita Arora Solved AssignmentUploaded byShisthruna Ramesh
- BYOD Devices - Deployment Guide for EducationUploaded byMohinuddin Mustaq
- 0x000007e blue screen error code – Solutions to fix blue screen error instantly!_Windows Error HelpUploaded bypavan509
- MIMU940v01 04 Dec 12 Yangon Region A1Uploaded byThiha Kyaw
- EXCEL Formula DictionaryUploaded bycoldflame81
- fzeroUploaded byPratyushAgarwal
- Excel to PDF Converter v3 0 Winall CatUploaded byDerek
- hw1.pdfUploaded byrighthearted
- Implementing Mobile Virtual Network Operations in BangladeshUploaded byJournal of Computing
- Nakisa UsefulUploaded byIttuk Partridge
- TOPO Chemistry NANO Chemistry Lecture 01Uploaded bylacramioaraiuliana
- Product Essentials For Sales Consultants - Oracle Solaris 11 Operating System (July 2014).pptxUploaded byJAy Rasta
- Holley CommunicationsUploaded byMUNGRADA
- A Basic Guide to the InternetUploaded byapi-3705156

## Much more than documents.

Discover everything Scribd has to offer, including books and audiobooks from major publishers.

Cancel anytime.