
Concept explainers
Which of the following are not valid program/function file names? Circle all that apply.
- A. 2b_solved.m
- B. calc_circuit.m
- C. graph_data.m
- D. help4me.m
- E. MATLAB is fun.m
- F. matrix*matrix.m
- G. Mult2#s.m
- H. pi.m
- I. ReadFile.m
- J. superCaliFragiListicExpiAliDocious.m
A.

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. Name of MATLAB function must start with a letter (alphabet).
- 2. The initial letter must be followed by letters, numbers or underscore.
- 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.

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.

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. Name of MATLAB function must start with a letter (alphabet).
- 2. The initial letter must be followed by letters, numbers or underscore.
- 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.

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.

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. Name of MATLAB function must start with a letter (alphabet).
- 2. The initial letter must be followed by letters, numbers or underscore.
- 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.

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. Name of MATLAB function must start with a letter (alphabet).
- 2. The initial letter must be followed by letters, numbers or underscore.
- 3. The name of MATLAB function must not resemble any reserved words in MATLAB.
- 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.

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. Name of MATLAB function must start with a letter (alphabet).
- 2. The initial letter must be followed by letters, numbers or underscore.
- 3. The name of MATLAB function must not resemble any reserved words in MATLAB.
- 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.

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.

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.

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?
Chapter 17 Solutions
Thinking Like an Engineer
- 6.76 A wind turbine is operating in a 12 m/s wind that has a den- sity of 1.2 kg/m³. The diameter of the turbine silhouette is 4 m. The constant-pressure (atmospheric) streamline has a diameter of 3 m upstream of the windmill and 4.5 m downstream. Assume that the velocity distributions are uniform and the air is incom- pressible. Determine the force on the wind turbine. m P = Patm 4 Vz 4m 4 m Fx. Problem 6.76arrow_forwardFor the position shown in the figure the spring is unstretched. The spring constant k, is designed such that after the system is released from rest, the speed of the mass is zero just as the 0.6 slug mass touches the floor. Find the spring constant, k and the maximum speed of block A and the location (distance above floor) where this occurs.arrow_forward||! Sign in MMB241 - Tutorial L9.pd X PDF MMB241 - Tutorial L10.pX DE MMB241 - Tutorial L11.p x PDF Lecture W12 - Work and X File C:/Users/KHULEKANI/Desktop/mmb241/MMB241%20-%20Tutorial%20L11.pdf PDE Lecture W11 - Power and X Draw Alla | Ask Copilot ++ 3 of 3 | D 6. If the 50-kg load A is hoisted by motor M so that the load has a constant velocity of 1.5 m/s, determine the power input to the motor, which operates at an efficiency € = 0.8. 1.5 m/s 2 7. The sports car has a mass of 2.3 Mg, and while it is traveling at 28 m/s the driver causes it to accelerate at 5m/s². If the drag resistance on the car due to the wind is FD= 0.3v²N, where v is the velocity in m/s, determine the power supplied to the engine at this instant. The engine has a running efficiency of P = 0.68. 8. If the jet on the dragster supplies a constant thrust of T-20 kN, determine the power generated by the jet as a function of time. Neglect drag and rolling resistance, and the loss of fuel. The dragster has a mass of 1…arrow_forward
- Q | Sign in PDE Lecture W09.pdf PDF MMB241 - Tutorial L9.pdi X PDF MMB241 - Tutorial L10.p X PDF MMB241 - Tutorial L11.p X Lecture W12-Work and X + File C:/Users/KHULEKANI/Desktop/mmb241/Lecture%20W12%20-%20Work%20and%20Energy.pdf ||! Draw | IA | a | Ask Copilot Class Work + 33 of 34 D Question 1 The engine of a 3500-N car is generating a constant power of 50 hp (horsepower) while the car is traveling up the slope with a constant speed. If the engine is operating with an efficiency of € 0.8, determine the speed of the car. Neglect drag and rolling resistance. Use g 9.81 m/s² and 1 hp = 745.7 W. 10 го Question 2 A man pushes on a 60-N crate with a force F. The force is always directed downward at an angle of 30° from the horizontal, as shown in the figure. The magnitude of the force is gradually increased until the crate begins to slide. Determine the crate's initial acceleration once it starts to move. Assume the coefficient of static friction is μ = 0.6, the coefficient of kinetic…arrow_forwardstate is Derive an expression for the volume expansivity of a substance whose equation of RT P = v-b a v(v + b)TZ where a and b are empirical constants.arrow_forwardFor a gas whose equation of state is P(v-b)=RT, the specified heat difference Cp-Cv is equal to which of the following (show all work): (a) R (b) R-b (c) R+b (d) 0 (e) R(1+v/b)arrow_forward
- of state is Derive an expression for the specific heat difference of a substance whose equation RT P = v-b a v(v + b)TZ where a and b are empirical constants.arrow_forwardTemperature may alternatively be defined as T = ди v Prove that this definition reduces the net entropy change of two constant-volume systems filled with simple compressible substances to zero as the two systems approach thermal equilibrium.arrow_forwardUsing the Maxwell relations, determine a relation for equation of state is (P-a/v²) (v−b) = RT. Os for a gas whose av Tarrow_forward
- (◉ Homework#8arrow_forwardHomework#8arrow_forwardBox A has a mass of 15 kilograms and is attached to the 20 kilogram Box B using the cord and pulley system shown. The coefficient of kinetic friction between the boxes and surface is 0.2 and the moment of inertia of the pulley is 0.5 kg * m^ 2. After 2 seconds, how far do the boxes move? A бро Barrow_forwardarrow_back_iosSEE MORE QUESTIONSarrow_forward_ios
- Refrigeration and Air Conditioning Technology (Mi...Mechanical EngineeringISBN:9781305578296Author:John Tomczyk, Eugene Silberstein, Bill Whitman, Bill JohnsonPublisher:Cengage Learning
