Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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 ... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Matlab An Introduction with Applications

Authors: Amos Gilat

5th edition

1118629868, 978-1118801802, 1118801806, 978-1118629864

More Books

Students also viewed these Programming questions