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
- 3. The Figure shows the isometric view of a machine component along with the view from above and the view from the left, draw the full sectional view from the front. 56 Draw here the full sectional view 90 40 (a) 32 56 B 32arrow_forwardHow do I solve this task?A spring scale should have a capacity for 10kg. The tension spring is mounted with a weight that is a preload in the spring. Choose a spring with a maximum load of 50mm. What distance should the kg weight be and what the preload weight should weigh.F=Fo+c·fFo= preload weight (N)F=10·9.81 → F=98.1 N Trying with a spring 3823f=F- Fo /c → 98.1-9/1.090=81.74 mmarrow_forwardA gearbox consists of four gears. Dimension the gearbox for a gear ratio of 18:1. The gear ratio should be as even as possible. In the first stage, module 4, in the second stage module 5. All shafts are in the same plane. Calculate the distance between Da. Da=45mm Db=40mmu=ωin/ ωout= nin/ nout= dout/ din= Mout/ Min= Zout/ Zind=m·z)da=m·(z+2) (top diameters)df=m·(z-2.5) (bottom diameters)tooth limits z1 z2 13 13-16 14 14-26 15 15-45 16 16-101 17 17-1314 18 18- .......arrow_forward
- Question 2 a) Construct the signal flow graph (SFG) for the block diagram shown in Fig. Q2 (a) and C($) obtain the gain using Mason's formula. R(s) 04 -R() 01 0₂ 0 Hi h Sinded States Text Predictions On Accessibility Unavailable Fig. Q2 (a) H₂ CAarrow_forwardHow do you solve for the force acting on member BC?arrow_forwardA brake jaw, A is pressed against the drum, B. Calculate the brake arm, X(m₂).F= 250NBraking torque = 30Nmµ=0.35Around point A:Fm₂-Nm₁-µm₃=0N=Fm₂/m1+ µm₃MBrake =µ·D/2= µ·D/2MBrake =Fµm₂D/2(m₁- µm₃)(X)m₂=FµD/Mbrake·2(m1- µm₃)(X)m₂=250·0.35.0.3/30·2(0.250-0.35·0.06)=?I don’t get some likely value?arrow_forward
- Q7 (12 Marks) For the system shown in Fig.3: 1- Draw the overall block diagram. 2- Determine the transfer function (Pc(s)/E(s)). Orifice→ Ps Actuating error signs) Flapper Pb+Pb. Nozzle. A X+X+ Ri A I R2 ㅍ think +y Pc+PCarrow_forwardFigures 4: show a pneumatic controller. The pneumatic relay has the characteristic that pc=K pb , where K>0. What kind of control action does this controller produce? a. Derive the mathematical model for the system b. Derive the transfer function Pc(s)/E(s) -Solve step by step Orifice F+Ph R₁ Actuating error signal Flapper Nozzle. x+x F+Pe thinkarrow_forwardThe equation of the turning moment diagram for the three crank engine and the equation of the moment required by a machine connected to this engine are given below: Engine Torque Machine Torque T=10000-500 sin (40) T=10000+2000 sin (20) N.m N.m where radians is the crank angle from inner dead center and the mean engine speed is 300 rpm. It is required to select a proper flywheel (find the moment of inertia of the flywheel in kgm2) and then calculate the power of the engine if the total percentage fluctuation of speed of the flywheel is ±1% of the mean speed. Calculate the angular acceleration of the flywheel when angle is 45°.arrow_forward
- Design a cotter joint to support a axial load of 100kN . Carbon steel material selected whichhas Tensile stress = 100MPa Compressive stress =150MPa; Shear stress =60MPaarrow_forwardDesign a cotter joint to support a axial load of 100kN . Carbon steel material selected whichhas Tensile stress = 100MPa Compressive stress =150MPa; Shear stress =60MPaarrow_forwardI need all the derivations from Bohr's postulates in handwritten formarrow_forward
- Elements Of ElectromagneticsMechanical EngineeringISBN:9780190698614Author:Sadiku, Matthew N. O.Publisher:Oxford University PressMechanics of Materials (10th Edition)Mechanical EngineeringISBN:9780134319650Author:Russell C. HibbelerPublisher:PEARSONThermodynamics: An Engineering ApproachMechanical EngineeringISBN:9781259822674Author:Yunus A. Cengel Dr., Michael A. BolesPublisher:McGraw-Hill Education
- Control Systems EngineeringMechanical EngineeringISBN:9781118170519Author:Norman S. NisePublisher:WILEYMechanics of Materials (MindTap Course List)Mechanical EngineeringISBN:9781337093347Author:Barry J. Goodno, James M. GerePublisher:Cengage LearningEngineering Mechanics: StaticsMechanical EngineeringISBN:9781118807330Author:James L. Meriam, L. G. Kraige, J. N. BoltonPublisher:WILEY