Discover
Questions library
Collections library
Find online teacher
login
Discover
questions library
Find online teacher
login
MATLAB: A Practical Introduction to Programming and Problem Solving
by
Stormy Attaway
Edition:
Fourth Edition
ISBN13:
ISBN10:
459
Matlab
Home
Books
MATLAB: A Practical Introduction to Programming and Problem Solving
Similar Books
No books found
Title
Chapter: 6 /
Q: 2.6
Write a function that will receive as an input argument a number of kilometers (K). The function will convert the kilometers to miles and to U.S. nautical miles, and return both results. The conversions are: 1K = 0.621 miles and 1 US nautical mile = 1.852 K
Chapter: 6 /
Q: 3.6
Write a function “splitem” that will receive one vector of numbers as an input argument, and will return two vectors: one with the positive (>=0) numbers from the original vector, and the second the negative numbers from the original vector. Use vectorized code (no loops) in your function
Chapter: 6 /
Q: 4.6
Write a function to calculate the volume and surface area of a hollow cylinder. It receives as input arguments the radius of the cylinder base and the height of the cylinder. The volume is given by r2 h, and the surface area is 2 r h
Chapter: 6 /
Q: 5.6
The geographic coordinate system is used to represent any location on Earth as a combination of latitude and longitude values. These values are angles that can be written in the decimal degrees (DD) form or the degrees, minutes, seconds (DMS) form just like time
Chapter: 6 /
Q: 6.6
Given the following function header: function doit(a, b) Which of the following function calls would be valid – and why?
Chapter: 6 /
Q: 7.6
Write a function that prints the area and circumference of a circle for a given radius. Only the radius is passed to the function. The function does not return any values. The area is given by π r2 and the circumference is 2 π r
Chapter: 6 /
Q: 8.6
Write a function that will receive an integer n and a character as input arguments, and will print the character n times
Chapter: 6 /
Q: 9.6
Write a function that receives a matrix as an input argument, and prints a random row from the matrix
Chapter: 6 /
Q: 10.6
Write a function that receives a count as an input argument, and prints the value of the count in a sentence that would read “It happened 1 time.” if the value of the count is 1, or “It happened xx times.” if the value of count (xx) is greater than 1
Chapter: 6 /
Q: 11.6
Write a function that receives an x vector, a minimum value, and a maximum value, and plots sin(x) from the specified minimum to the specified maximum
total questions:
459
Previous
18
19
20
21
22
Next
Questions
459
Views
Best Answers
299
Points
5
×
Close
add reason
reason