Calculate log multiple columns

3 views (last 30 days)
Fernanda Jesus
Fernanda Jesus on 23 Jan 2022
Commented: Fernanda Jesus on 23 Jan 2022
I was trying to apply log in the fist and second line of this database, but it is no working. I would like to apply log from the column 5 till the end of the data
Germany_Greece(1:2,5:end)=log(Germany_Greece(1:2,5:end));

Accepted Answer

Matt J
Matt J on 23 Jan 2022
Edited: Matt J on 23 Jan 2022
Your code is correct, assuming Germany_Greece is a matrix and not a table or some other data type.
  3 Comments
Matt J
Matt J on 23 Jan 2022
Germany_Greece{1:2,5:end}=log(Germany_Greece{1:2,5:end});

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!