Question: In Matlab!! Make sure it is a matlab code.. Answer the fooling question in mat lab Write a script that reads from the CuboidDimensions.txt file

In Matlab!! Make sure it is a matlab code.. Answer the fooling question in mat lab
Write a script that reads from the CuboidDimensions.txt file with the values shown below
456
658
395
573
These values should be stored in a matrix called CuboidDimen sions. For each row in the CuboidDimensions matrix, the first value represents the length, the second value is
the width and the third value is the height. For example, in the first row the length =4, the width =5 and the height =6. The other lines in the CuboidDimensions.txt file can be
read in the same way.
The script should qenerate an output file called cuboidMe asurements. txt with values in the form shown below.
60148120
64166140
76236240
68174135
60142105
where, for example, in the first line of CuboidHeasurements. txt file the first value representing the perimeter =60, the second value representing surface area =148 and the
third value representing the volume =120. All these values should be first stored in a matrix caled CuboidMeasurements before being saved to the CuboidMeasurement s. txt
file.
HINT: To get the output in the required format, copy and paste the writematrix function below in your code.
writematrix( Cuboidweasurements, 'CuboidMeasurements.txt', 'Delimiter",')

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!