Thinking Like an Engineer: An Active Learning Approach w/ access code
Thinking Like an Engineer: An Active Learning Approach w/ access code
15th Edition
ISBN: 9781269890441
Author: STEPHAN
Publisher: PEARSON
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
Which clause of an SQL query is used to restrict the number of rows returned?
Hello, statics please help   tabular method
must be solved in matlab and sent me to code input and output .

Chapter 17 Solutions

Thinking Like an Engineer: An Active Learning Approach w/ access code

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
Elements Of Electromagnetics
Mechanical Engineering
ISBN:9780190698614
Author:Sadiku, Matthew N. O.
Publisher:Oxford University Press
Text book image
Mechanics of Materials (10th Edition)
Mechanical Engineering
ISBN:9780134319650
Author:Russell C. Hibbeler
Publisher:PEARSON
Text book image
Thermodynamics: An Engineering Approach
Mechanical Engineering
ISBN:9781259822674
Author:Yunus A. Cengel Dr., Michael A. Boles
Publisher:McGraw-Hill Education
Text book image
Control Systems Engineering
Mechanical Engineering
ISBN:9781118170519
Author:Norman S. Nise
Publisher:WILEY
Text book image
Mechanics of Materials (MindTap Course List)
Mechanical Engineering
ISBN:9781337093347
Author:Barry J. Goodno, James M. Gere
Publisher:Cengage Learning
Text book image
Engineering Mechanics: Statics
Mechanical Engineering
ISBN:9781118807330
Author:James L. Meriam, L. G. Kraige, J. N. Bolton
Publisher:WILEY
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