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: 3 /
Q: 30.3
A Pythagorean triple is a set of positive integers (a,b,c) such that a2 + b2 = c2 . Write a function ispythag that will receive three positive integers (a, b, c in that order) and will return logical 1 for true if they form a Pythagorean triple, or 0 for false if not
Chapter: 3 /
Q: 31.3
A function can return a vector as a result. Write a function vecout that will receive one integer argument and will return a vector that increments from the value of the input argument to its value plus 5, using the colon operator. For example
Chapter: 3 /
Q: 32.3
Write a function called pickone, which will receive one input argument x, which is a vector, and will return one random element from the vector. For example,
Chapter: 3 /
Q: 33.3
The conversion depends on the temperature and other factors, but an approximation is that 1 inch of rain is equivalent to 6.5 inches of snow. W
Chapter: 3 /
Q: 34.3
In thermodynamics, the Carnot efficiency is the maximum possible efficiency of a heat engine operating between two reservoirs at different temperatures. The Carnot efficiency is given as
Chapter: 3 /
Q: 35.3
Many mathematical models in engineering use the exponential function. The general form of the exponential decay function is:
Chapter: 4 /
Q: 1.4
Write a script that tests whether the user can follow instructions. It prompts the user to enter an ‘x’. If the user enters anything other than an ‘x’, it prints an error message – otherwise, the script does nothing
Chapter: 4 /
Q: 2.4
Write a function nexthour that receives one integer argument, which is an hour of the day, and returns the next hour. This assumes a 12- hour clock; so, for example, the next hour after 12 would be 1. Here are two examples of calling this function
Chapter: 4 /
Q: 4.3
The speed of a sound wave is affected by the temperature of the air. At 0° C, the speed of a sound wave is 331 m/sec. The speed increases
Chapter: 4 /
Q: 4.4
When would you use just an if statement and not an if-else?
total questions:
459
Previous
10
11
12
13
14
Next
Questions
459
Views
Best Answers
299
Points
5
×
Close
add reason
reason