Attribution Non-Commercial (BY-NC)

4 views

Attribution Non-Commercial (BY-NC)

- 64 Interview Questions
- B.tech IT - AM Edhole.com
- Microprocessors
- Chapter 3 Mohammad
- Instruction Set 8085
- Multi Sim
- Microprocessor & itsMicroprocessor & its applications.pptx applications.pptx
- Digital Circuits Number Base Calcs
- b5
- Prayer
- The Assurance of Answered Prayer
- lesson_5
- Chapter 1
- 8085.InstructionSet
- file-ops
- ch04
- UnixCh05
- General Programming 101304
- UNIX SCRIPTING
- MALP Edusat

You are on page 1of 2

Practise sending a diary le, or other Matlab le, by email. Send one to yourself as a test. Try sending gures also. Type your answers to these questions either into a text le or into a Matlab .m le. In the real exam you will be expected to email your answers to the instructor.

Questions

1. How many digits of precision in the following numbers? (a) 123.456 (b) 0.000123 (c) 1.234 106 (d) 1.2340 106 (e) 93 000 000 2. How many digits of precision does Matlab work to? 3. What is the eect of the format short command? 4. Explain why the variable y in the following script is not 0. format short x=1/3 y=x-0.3333 5. Write a Matlab function to evaluate the function y = sin2 (x2 ). Plot the function. 6. Write a function check1 that takes a vector as input and prints an error message for all vectors that do not have exactly three components. 7. Write a function check2 that takes a vector as input and prints an error message unless every component is nonzero. 8. Write a function swap1 that takes a vector as input and returns another vector with the rst two components swapped. 9. Write a function ordering that takes a vector as input and returns another vector in which the components of the rst vector are in descending order. Do not use the Matlab function sort. 1

10. Write a function outer1 that does the following. It takes as arguments two matrices that are 1 n. Let the matrices be x and y. The output of the function outer1 contains two (2) items. One is the product xT y and the other is the product yxT . In these expressions, xT is the transpose of the matrix x. 11. A student has the following function: function result=myfun1(a) reciprocal=1/a result=2*reciprocal In Matlab, the student types the following a=3 myfun1(a) reciprocal What value does Matlab print for reciprocal, and why?

1 12. Plot the two functions cos x and 1 2 x2 on the same axes.

13. Find the polynomial that passes through the points x = [1, 2, 3, 4, 5, 6] y = [3, 1, 4, 1, 5, 9] What is the value at x = 3.5 ? 14. Fit a polynomial through data obtained from y = cos x. Choose 7 equally spaced points between x = 0 and x = 3. Find the value of x for which the polynomial is 0. How close is this value to the correct value?

- 64 Interview QuestionsUploaded byshivakumar N
- B.tech IT - AM Edhole.comUploaded byAchiaa Osei-Donkor
- MicroprocessorsUploaded byarokiaraj
- Chapter 3 MohammadUploaded byAchiaa Osei-Donkor
- Instruction Set 8085Uploaded byali.sohail007412
- Multi SimUploaded byGanesh Kumar Arumugam
- Microprocessor & itsMicroprocessor & its applications.pptx applications.pptxUploaded byAchiaa Osei-Donkor
- Digital Circuits Number Base CalcsUploaded byAchiaa Osei-Donkor
- b5Uploaded byAchiaa Osei-Donkor
- PrayerUploaded byAchiaa Osei-Donkor
- The Assurance of Answered PrayerUploaded byAchiaa Osei-Donkor
- lesson_5Uploaded byAchiaa Osei-Donkor
- Chapter 1Uploaded byAchiaa Osei-Donkor
- 8085.InstructionSetUploaded bykumar1432
- file-opsUploaded byAchiaa Osei-Donkor
- ch04Uploaded byAchiaa Osei-Donkor
- UnixCh05Uploaded byAchiaa Osei-Donkor
- General Programming 101304Uploaded byAchiaa Osei-Donkor
- UNIX SCRIPTINGUploaded byBhanu Chowdary
- MALP EdusatUploaded byAchiaa Osei-Donkor
- lect6Uploaded byAchiaa Osei-Donkor
- Ch10-ShellScriptingUploaded byAchiaa Osei-Donkor
- BASH as a Modern Programming Language Presentation 1Uploaded byAchiaa Osei-Donkor
- Emacs LectureUploaded byAchiaa Osei-Donkor
- aecUploaded byVenkat Chalapathi
- Lecture20-BJT Small Signal ModelUploaded byMuhammad Abd Jalil
- 0612617Uploaded byAchiaa Osei-Donkor
- precipitation_reviewUploaded byAchiaa Osei-Donkor