Thinking Like an Engineer
Thinking Like an Engineer
4th Edition
ISBN: 9781269910989
Author: Elizabeth A. Stephan, David R. Bowman, William J. Park, Benjamin L. Sill, Matthew W. Ohland
Publisher: Pearson Learning Solutions
bartleby

Concept explainers

bartleby

Videos

Textbook Question
Book Icon
Chapter 17, Problem 1ICA

Which of the following are not valid program/function file names? Circle all that apply.

  1. A.    2b_solved.m
  2. B.     calc_circuit.m
  3. C.     graph_data.m
  4. D.    help4me.m
  5. E.     MATLAB is fun.m
  6. F.      matrix*matrix.m
  7. G.    Mult2#s.m
  8. H.    pi.m
  9. I.        ReadFile.m
  10. J.       superCaliFragiListicExpiAliDocious.m

A.

Expert Solution
Check Mark
To determine

Check whether the given function name or program is valid or invalid.

Answer to Problem 1ICA

The function name 2b_solved.m is invalid.

Explanation of Solution

Rules for naming MATLAB program/function.

  1. 1. Name of MATLAB function must start with a letter (alphabet).
  2. 2. The initial letter must be followed by letters, numbers or underscore.
  3. 3. The name of MATLAB function must not resemble any reserved words in MATLAB.

The given name 2b_solved.m is started with a number not with a letter. Therefore, the given function name is invalid.

Conclusion:

Therefore, the function name 2b_solved.m is invalid.

B.

Expert Solution
Check Mark
To determine

Check whether the given function name or program is valid or invalid.

Answer to Problem 1ICA

The function name calc_circum.m is valid.

Explanation of Solution

The given function name calc_circum.m meets all the criteria of rules that have to be followed for proper function name. Therefore, the given function name is valid.

Conclusion:

Therefore, the function name calc_circum.m is valid.

C.

Expert Solution
Check Mark
To determine

Check whether the given function name or program is valid or invalid.

Answer to Problem 1ICA

The function name graph-data.m is invalid.

Explanation of Solution

Rules for naming MATLAB program/function.

  1. 1. Name of MATLAB function must start with a letter (alphabet).
  2. 2. The initial letter must be followed by letters, numbers or underscore.
  3. 3. The name of MATLAB function must not resemble any reserved words in MATLAB.

The given function name graph-data.m contains hyphen (which is not allowed) not an underscore. Hence, the given function name is invalid.

Conclusion:

Therefore, the function name graph-data.m is invalid.

D.

Expert Solution
Check Mark
To determine

Check whether the given function name or program is valid or invalid.

Answer to Problem 1ICA

The function name help4me.m is valid.

Explanation of Solution

The given function name help4me.m meets all the criteria of rules that have to be followed for proper function name. Therefore, the given function name is valid.

Conclusion:

Therefore, the function name help4me.m is valid.

E.

Expert Solution
Check Mark
To determine

Check whether the given function name or program is valid or invalid.

Answer to Problem 1ICA

The function name MATLAB is fun.m is invalid.

Explanation of Solution

Rules for naming MATLAB program/function.

  1. 1. Name of MATLAB function must start with a letter (alphabet).
  2. 2. The initial letter must be followed by letters, numbers or underscore.
  3. 3. The name of MATLAB function must not resemble any reserved words in MATLAB.

The given function name MATLAB is fun.m contain spacing between the words, which is not allowed. Hence, the given function name is invalid.

Conclusion:

Therefore, the function name MATLAB is fun.m is invalid.

F.

Expert Solution
Check Mark
To determine

Check whether the given function name or program is valid or invalid.

Answer to Problem 1ICA

The function name matrix*matrix.m is invalid.

Explanation of Solution

Rules for naming MATLAB program/function.

  1. 1. Name of MATLAB function must start with a letter (alphabet).
  2. 2. The initial letter must be followed by letters, numbers or underscore.
  3. 3. The name of MATLAB function must not resemble any reserved words in MATLAB.
  4. 4. The name of MATLAB function should not contain any special characters like *, #, $ etc. and spacing between the words.

The given function name matrix*matrix.m contains a special character “*” which is not allowed. Hence, the given function name is invalid.

Conclusion:

Therefore, the function name matrix*matrix.m is invalid.

G.

Expert Solution
Check Mark
To determine

Check whether the given function name or program is valid or invalid.

Answer to Problem 1ICA

The function name Mult2#s.m is invalid.

Explanation of Solution

Rules for naming MATLAB program/function.

  1. 1. Name of MATLAB function must start with a letter (alphabet).
  2. 2. The initial letter must be followed by letters, numbers or underscore.
  3. 3. The name of MATLAB function must not resemble any reserved words in MATLAB.
  4. 4. The name of MATLAB function should not contain any special characters like *, #, $ etc. and spacing between the words.

The given function name Mult2#s.m contains a special character “#” which is not allowed. Hence, the given function name is invalid.

Conclusion:

Therefore, the function name Mult2#s.m is invalid.

H.

Expert Solution
Check Mark
To determine

Check whether the given function name or program is valid or invalid.

Answer to Problem 1ICA

The function name pi.m is invalid.

Explanation of Solution

The given function name pi.m meets all the criteria of rules that have to be followed for proper function name. Even though pi.m meets all the criteria, it’s a built-in MATLAB function, which provides the standard value as 3.14. So, it is necessary to avoid the file names, which are same as the name of standard built-in functions.

Conclusion:

Therefore, the function name pi.m is invalid.

I.

Expert Solution
Check Mark
To determine

Check whether the given function name or program is valid or invalid.

Answer to Problem 1ICA

The function name ReadFile.m is valid.

Explanation of Solution

The given function name ReadFile.m meets all the criteria of rules that have to be followed for proper function name. Therefore, the given function name is valid.

Conclusion:

Therefore, the function name ReadFile.m is valid.

J.

Expert Solution
Check Mark
To determine

Check whether the given function name or program is valid or invalid.

Answer to Problem 1ICA

The function name SuperCaliFragiListicExpiAliDocious.m is valid.

Explanation of Solution

The given function name SuperCaliFragiListicExpiAliDocious.m meets all the criteria of rules that have to be followed for proper function name. Therefore, the given function name is valid.

Conclusion:

Therefore, the function name SuperCaliFragiListicExpiAliDocious.m is valid.

Want to see more full solutions like this?

Subscribe now to access step-by-step solutions to millions of textbook problems written by subject matter experts!
Students have asked these similar questions
on-the-job conditions. 9 ±0.2- 0.5 M Application questions 1-7 refer to the drawing above. 1. What does the flatness tolerance labeled "G" apply to? Surface F A. B. Surfaces E and F C. Surfaces D, E, H, and I D. The derived median plane of 12 +0.2 0.5 0.5 CF) 20 ±0.2 0.1 7. O 12 ±0.2- H 0.3 ASME Y14.5-2009
elements, each with a length of 1 m. Determine the temperature on node 1, 2, 3, 4. 3. Solve the strong form analytically (you may choose Maple, MATLAB or Mathematica to help you solve this ODE). Compare the FE approximate temperature distribution through the block against the analytical solution. 1 (1) 200 °C 2 (2) 3 m 3 (3)
Compute the horizontal and vertical components of the reaction at the pin A. B A 30° 0.75 m 1 m 60 N 0.5 m 90 N-m

Chapter 17 Solutions

Thinking Like an Engineer

Ch. 17 - Prob. 8ICACh. 17 - Prob. 9ICACh. 17 - The Shockley diode equation gives the relationship...Ch. 17 - For each MATLAB code segment shown, write the...Ch. 17 - Prob. 12ICACh. 17 - A member of your team gives you the following...Ch. 17 - Prob. 14ICACh. 17 - Consider the following MATLAB program and...Ch. 17 - A novice MATLAB user created the following code...Ch. 17 - The specific gravity of gold is 19.3. Write a...Ch. 17 - An unmanned X-43A scramjet test vehicle has...Ch. 17 - A rod on the surface of Jupiters moon Callisto has...Ch. 17 - The Eco-Marathon is an annual competition...Ch. 17 - Write a program to determine the mass of oxygen...Ch. 17 - Write a program to convert a temperature provided...Ch. 17 - Write a program to determine how long, in units of...Ch. 17 - A cylindrical tank filled to a height of 25 feet...Ch. 17 - Write a MATLAB program that implements the...Ch. 17 - Write a MATLAB program that implements the...Ch. 17 - The specific gravity of gold is 19.3. Write a...Ch. 17 - An unmanned X-43A scramjet test vehicle has...Ch. 17 - Prob. 13RQCh. 17 - A cylindrical tank filled to a height of 25 feet...Ch. 17 - Write a function that implements the quadratic...Ch. 17 - Write a function that implements the Pythagorean...Ch. 17 - As part of a team investigating the effect of mass...Ch. 17 - We have made many measurements of coffee cooling...Ch. 17 - In a factory, various metal pieces are forged and...Ch. 17 - Prob. 21RQCh. 17 - Prob. 22RQCh. 17 - You have been assigned to a new project at work....Ch. 17 - You have been assigned to a new project at work....Ch. 17 - You have been assigned to a new project at work....
Knowledge Booster
Background pattern image
Mechanical Engineering
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, mechanical-engineering and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Refrigeration and Air Conditioning Technology (Mi...
Mechanical Engineering
ISBN:9781305578296
Author:John Tomczyk, Eugene Silberstein, Bill Whitman, Bill Johnson
Publisher:Cengage Learning
The Robot Revolution: The New Age of Manufacturing | Moving Upstream; Author: Wall Street Journal;https://www.youtube.com/watch?v=HX6M4QunVmA;License: Standard Youtube License