MATLAB: How to convert a dataset of numbers into a dataset of logarithms of these numbers
convert dataset into logs
Hi
I have imported an Excel dataset of real-time GDP. Which is a dataset of numbers in a triangular format.
So I want to convert this dataset into logs of these numbers. Is there any fast way??
Many thanks
Best Answer
You need to load the dataset into the MATLAB workspace (usexlsread), then simply use the logarithm function of your choice on the entire dataset. Your options are:log (Napierian logarithms),log2 (base2 logarithms), orlog10 (base10 logarithms). Then save to the file type of your choice. (I suggest a‘.mat’ file,)
Best Answer