1. Write a script which prompts the user enter the dimensons of a cubic object and...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. Write a script which prompts the user enter the dimensons of a cubic object and calculates its volume and surface area. Next the script must write the results in the following format in the file called "mydata.txt": The volume of the cubic object is 8.000 cm3 The surface of the object is 24.000 cm2. 2. Modify the previus problem such that the result for the volume is written in the file "mydata01.txt" and the result for the surface area is written in the file "mydata02.txt". 3. Write a script which prompts the user enter the number of the students in his/her classroom and display the following output using "disp" and "num2str". The number of the students is 23. 4. Write a user-defined function called "myfun" which calculates the following function: 3x-4, x<1 f(x)= x+2, 1 ≤x≤ 10 2x+4, x>10 5. Fiboacci Numbers can be obtained from п 1 Fr => √(5) + Using vectorization method find the sum of the terms which are smaller than 1 x 10. (Answer: 1.9642 x 10%) 6. Solve the previous problem using a while loop, but without a break command. 7. Solve the previous problem using an infinite loop and a break command. 1. Write a script which prompts the user enter the dimensons of a cubic object and calculates its volume and surface area. Next the script must write the results in the following format in the file called "mydata.txt": The volume of the cubic object is 8.000 cm3 The surface of the object is 24.000 cm2. 2. Modify the previus problem such that the result for the volume is written in the file "mydata01.txt" and the result for the surface area is written in the file "mydata02.txt". 3. Write a script which prompts the user enter the number of the students in his/her classroom and display the following output using "disp" and "num2str". The number of the students is 23. 4. Write a user-defined function called "myfun" which calculates the following function: 3x-4, x<1 f(x)= x+2, 1 ≤x≤ 10 2x+4, x>10 5. Fiboacci Numbers can be obtained from п 1 Fr => √(5) + Using vectorization method find the sum of the terms which are smaller than 1 x 10. (Answer: 1.9642 x 10%) 6. Solve the previous problem using a while loop, but without a break command. 7. Solve the previous problem using an infinite loop and a break command.
Expert Answer:
Answer rating: 100% (QA)
To address the tasks provided I will create MATLAB scripts for each problem as described 1 Script to ... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
ccn2 java solve them all . . . r2 e1 e2 box r2 Write sound typing and subtyping rules for these constructs. [5 marks] Now suppose that we add to this calculus the type variables and bounded universal...
-
ccm1 java attend all . . . r2 e1 e2 box r2 Write sound typing and subtyping rules for these constructs. [5 marks] Now suppose that we add to this calculus the type variables and bounded universal...
-
Write a python program that reads a string S containing integers and prints the maximum number of toys Robert has to buy for Charlie . . Input : 5 1 2 2 4 5 1 2 2 4 Output : 3 3
-
Byrd Company produces one product, a putter called GO-Putter. Byrd uses a standard cost system and determines that it should take one hour of direct labor to produce one GO-Putter. The normal...
-
An algorithm takes 0.5 ms for input size 100. How long will it take for input size 500 if the running time is the following (assume low-order terms are negligible): a. Linear b. O(N logN) c....
-
Rockstar Games, a subsidiary of Take-Two Interactive, released the video game Grand Theft Auto V in 2013. The game features a character named Lacey Jonas, a self-proclaimed actress slash singer and...
-
The bill of materials for a finished product E, inventory status and other relevant information are given below. Compute the planned order releases and projected on-hand balances for parts E, F and...
-
Activity 3 Response: As an investigation of scientific question B, consider an object that is not the human body, but that also has a consistently higher temperature than the environment. Based on...
-
Use the following to answer questions 1 5 - 1 9 The company had the following account balances at the end of December before preparing the financial statements: Accounts Balances Common stock $ 4 0 0...
-
Return on Security Investment (ROSI) Security investment is a little more complex. There are no tangible gains in investment directed at information security. The return is measured on risk...
-
Joseph Upholstery's aging of accounts receivable is as follows: 0-90 days $150,000 91 days and over 64,000 Joseph needs $80,000 to purchase upholstery fabric at an exhibition next month. Ace...
-
Mando just graduated with a BA in accounting. He wants to find a job. The first step Mando should take is sending out cover letters and resumes to all the large accounting firms in his region. Group...
-
Out of 200 students appearing in an examination, 130 passed in Mathematics and 110 passed in Statistics. If 40 of them failed in both Mathematics and Statistics, find the number of students who...
-
Determine the Arithmetic mean, median, mode, range, sample variance and standard deviation. Write the steps. Listed below are the salaries, in thousands of dollars, for a sample of 13 chief financial...
-
Obtain the regression equation. (Round your answers to 3 decimal places.) Y= X+ Calculate R2. (Round your answer to 3 decimal places.)
-
Cable Corporation is 60% owned by Anna and 40% owned by Jim, who are unrelated. It has noncash assets, which it sells to an unrelated purchaser for $100,000 in cash and $900,000 in installment...
-
Two trigonometric identities are given by: (a) sin 5x = 5sinx- 20sin3x+ 16sin5x (b) sin2xcos2x = 1 - cos4x/8 For each part, verify that the identity is correct by calculating the values of the left...
-
The electrical circuit shown consists of resistors and voltage sources. Determine i1, i2, i3, i4 and i5, using the mesh current method based on Kirchhoff's voltage law (see Sample Problem 3-4). V1, =...
-
Plot the polynomial y = 0.lx5 - 0.2x4 -x3 + 5x2 - 41.5x + 235 in the domain -6 < x < 6 . First create a vector for x, next use the polyval function to calculate y, and then use the plot function.
-
Consider an open economy with flexible exchange rates. Suppose output is at the natural level, but there is a trade deficit. The goal of policy is to reduce the trade deficit and leave the level of...
-
Flexible exchange rates and foreign macroeconomic events Consider an open economy with flexible exchange rates. Let UIP stand for the uncovered interest parity condition. a. In an IS-LM-UIP diagram,...
-
We showed that a reduction in the interest rate in an economy operating under flexible exchange rates leads to an increase in output and a depreciation of the domestic currency. a. How does the...
The A To Z Of Final Expense Field And Phone Sales Large Print Edition - ISBN: 1546550453 - Free Book
Study smarter with the SolutionInn App