
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: An Active Learning Approach (3rd Edition)
- Problem Statement A large plate of insulating material 8 cm thick has in it a 3 cm-diam hole, with axis normal to the surface. The temperature of the surroundings are 1800 K at one side of the plate and 400 K on the other side. Insulating plate D= 3 cm H= 8 cm Considering the sides of the hole to be black, (a) Draw a system of resistors that can be used to solve for the various heat transfer rates. For full credit you must label all "voltages", "currents," and resistances present. (b) Estimate the radiative heat transfer through the hole.arrow_forwardUsing MATLAB, plot the unit-step response curve for the following transfer function and Using MATLAB, obtain the rise time, peak time, maximum overshoot, and settling time. Auto Controls Provide codesarrow_forwardUse Routh's stability criterion to determine how many roots with positive real partsthe following equations have Auto Controls Show full solutionsarrow_forward
- Plot the unit step and unit ramp response curve for the following closed loop transferfunction using MATLAB. Indicate clearly the input and output in your plot Auto Controls provide matlab codearrow_forwardUsing a "for loop" in MATLAB program to obtain the unit-step response of thissystem for the following four cases in a single plot What can you observe from the plot? Auto Controls Provide matlab codearrow_forwardProblem 2 (40 Points) A particle of mass m is embedded at a distance a from the center of a massless circular disk of radius r. The disk rolls without slipping down a plane inclined at an angle a with the horizontal. A horizontal force of Ễ = −Fxî + Fyĵ resists motion of the disk down the plane by pushing on the disk at the axle that runs through the center of the disk. a) Find the kinetic energy T. (10 points) b) Find the potential energy V. (10 points) c) Write a position vector to the axle at the center of the wheel in terms of x and y. (10 points) d) Using virtual work, find the applied force Q₁ that would go in Lagrange's Equations. DO NOT WRITE OUT OR SOLVE LAGRANGES'S EQUATIONS. (10 points) x r m e 10 g F α HINTS 1) Consider using the STATIONARY red xy frame a reference frame from which to draw vectors 2) The red xy system DOES NOT move. It is stationary. 3) Consider that the disk rolls a distance of re down the ramparrow_forward
- Draw a counter balance circuit of a vertical cylinder. using counter balance valve and external load.arrow_forwardplease sketch a stress-strain diagram for a typical structural steel in tension and display all of the important features.arrow_forwardProblem 1 (30 Points) Consider the following 2 scenarios. In scenario 1, a mass m slides on a cylindrical surface of radius R. In scenario 2, a mass m hangs at the end of a thin massless rod of length R. In both scenarios, there is no friction either on the surface (scenario 1), or at the pivot point of the pendulum (scenario 2). Also in both scenarios, there is one generalized coordinate, . R Scenario 1 R m R g Scenario 2 m HINT: In both scenarios, it is much easier to choose your datum for potential energy as the center of the bowl (scenario 1), or the pivot point of the pendulum (scenario 2). Part I a) Determine the Lagrangian for each system. DO NOT FIND THE EQUATIONS OF MOTION (5 points) b) What can you say about the systems based on the Lagrangian? (2 points) c) Solve for the equations of motion for both systems. (8 points) Part II Now, for scenario 1, introduce an additional coordinate and treat it as a nonholonomic system to determine the normal force acting on the mass. a)…arrow_forward
- Consider 0.65 kg of N2 at 300 K, 1 bar contained in a rigid tank connected by a valve to another rigid tank holding 0.3 kg of CO2 at 300 K, 1 bar. The valve is opened and gases are allowed to mix, achieving an equilibrium state at 290 K. Determine: (a) the volume of each tank, in m³. (b) the final pressure, in bar. (c) the magnitude of the heat transfer to or from the gases during the process, in kJ. (d) the entropy change of each gas and of the overall system, in kJ/K.arrow_forward(Read Image) (Answer: ω = 1.10 rad/sec CW)arrow_forwardWhat is the configuration of the control loop if steam must be shut down in case of a problem? (I found this question on the internet and was wondering what the answer is) A.Valve is fail open, PIC is direct-acting, TIC is reverse acting, and controller algorithm is feed-forwarding.B. Valve is fail open, PIC is reverse-acting, TIC is direct acting, and controller algorithm is cascade.C. Valve is fail closed, PIC is direct-acting, TIC is reverse acting, and controller algorithm is feed-forward.D. Valve is fail closed, PIC is reverse-acting, TIC is reverse acting, and controller algorithm is cascade.arrow_forward
- Refrigeration and Air Conditioning Technology (Mi...Mechanical EngineeringISBN:9781305578296Author:John Tomczyk, Eugene Silberstein, Bill Whitman, Bill JohnsonPublisher:Cengage Learning
