Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. Write a script which prompts the user enter the dimensons of a cubic object and calculates its volume and surface area. Next the
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 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.
Step by Step Solution
★★★★★
3.36 Rating (165 Votes )
There are 3 Steps involved in it
Step: 1
To address the tasks provided I will create MATLAB scripts for each problem as described 1 Script to ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started