
For each of the following tasks, write a single MATLAB statement to achieve that goal.
a. Create a text string named Greek that begins with Alpha, ends with omega, and has 250,000 blanks in between.
b. Assume the text string TS contains a single word. Using only a single MATLAB command, create a text string named Padded that contains the same word stored in Ts, but with a space between each character of the original word.
For example, Rabbit becomes Rabbit.
c. If N1-'5' and N2-'8' then N3=N1+N2 places the value 109 in N3. (Try it!) This is because you are actually adding the ASCII codes for the CHARACTERS '5' and '8', NOT the values 5 and 8. Write a statement that will correctly add the values represented by the characters in N1 and N2, giving a result of 13 in this specific case. This should function correctly for any single digit, non-negative integers stored in N1 and N2. HINT: Refer to Table 15-8
d. Assume that a text string TS already exists. Convert all letters in the first half of the text string to uppercase and leave the characters in the second half unchanged. You may assume there are an even number of characters in TS.

Want to see the full answer?
Check out a sample textbook solution
Chapter 15 Solutions
Thinking Like an Engineer: An Active Learning Approach (4th Edition)
- a) Briefly explain what ratio control is. Give an example of a common chemical engineering situation in whichratio control would be useful and for that example state exactly how ratio control works (what would bemeasured, what is set, and how the controller logic works).b) Briefly explain what cascade control is. Give an example of a common chemical engineering situation inwhich cascade control would be useful and for that example state exactly how cascade control works (whatwould be measured, what is set, and how the controller logic works).arrow_forwardDetermine the reaction force acting on the beam AB, given F = 680 N. 5 4 4 m 3 3 A B 30° 3 m F (N)arrow_forwardThe frame in the figure is made of an HEA 300 profile (E = 210 GPa, material S355).a) Determine the support reactions at point A. (1p)b) Sketch the bending moment diagram caused by the loading. (1p)c) Using the principle of virtual work (unit load method), calculate the vertical displacement at point B using moment diagrams. Also take into account the compression of the column. (3p)arrow_forward
- 9 kN/m 6 kN/m 3 m 6 m Bestäm, med hjälp av friläggning och jämviktsberäkningar, tvärkrafts- och momentdiagram för balken i figuren. Extrempunkter ska anges med både läge och värde.arrow_forwardB C 3.0 E F G 40 kN [m] 3.0 3.0 3.0 Fackverket belastas med en punktlast i G enligt figuren. Bestäm normalkraften i stängerna BC, BF och EF.arrow_forwardL q=8 kN/m P= 12 kN En stång belastas av en punklast P vid sin ena ände samt av en jämnt utbredd last q längs hela sin längd. Stången har en tvärsnittsarea A = 150 mm² och är tillverkad av stål med elasticitetsmodul E-210 GPa. Stångens längd, i sitt obelastade tillstånd, är Z-3 m. a) Hur stor är den största normalspänning som uppstår i stången? b) Hur stor blir förlängningen av stången, orsakad av lasterna P och q?arrow_forward
- A turbocharged engine with a compression ratio of 8 is being designed using an air standard cycle. The ambient air is assumed to be 300K and 100 kPa. The temperature at the end of the compression in the cylinder is desired to be 1000K, assuming no combustion prior to reaching TDC. At the end of the cylinder expansion the temperature is also desired to be 1000K. If both the turbine and the compressor have mechanical efficiencies of 80%, what will be the pressure ratio of the compressor and what will be the turbine exhaust temperature?arrow_forwardQ6: A turbocharged engine with a compression ratio of 8 is being designed using an air standard cycle. The ambient air is assumed to be 300K and 100 kPa. The temperature at the end of the compression in the cylinder is desired to be 1000K, assuming no combustion prior to reaching TDC. At the end of the cylinder expansion the temperature is also desired to be 1000K. If both the turbine and the compressor have mechanical efficiencies of 80%, what will be the pressure ratio of the compressor and what will be the turbine exhaust temperature?arrow_forwardQ5: A 5.6 litre V8 engine with a compression ratio of 9.4:1 operates on an air-standard Otto cycle at 2800 RPM, with a volumetric efficiency of 90 % and a stoichiometric air-fuel ratio using gasoline. The exhaust flow undergoes a temperature drop of 44ºC as it passes through the turbine of the supercharger. Calculate (a) mass flow rate of exhaust gas and (b) power available to drive the turbocharger compressor.arrow_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





