In MATLAB: I have two files that need to downloaded and read into MATLAB. What i
ID: 3857871 • Letter: I
Question
In MATLAB:
I have two files that need to downloaded and read into MATLAB. What is the procedure and code for doing this? The first file is "Data01.csv" and it is a text file, the second file is "Data02.mat" and it is a binary file. The time needs to be recorded to read each file.
The two files were written from MATLAB, using the same data and thus should contain the same numbers. Compute the Maximum Absolute Relative Error (MaxARE) between the data from the two files, assuming that the binary (Data02) data is more accurate. What is the code and procedure for this?
Explanation / Answer
Data01.csv can be read as follows:
[a, b, c] = xlsread('Data01.csv');
Data02.mat can be loaded as
load Data02.mat
This will automatically load all the variables with values from the .mat file.
Load the variable values from both the files. Compare each set of values and find the maximum difference between any set of values. This would be the MaxAre between the 2 file's data
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.