How to do operation between number inside two cell
Show older comments
Hi All,
I have two tables, table A and B. Each table consists of three coloumns defining the longitude, latitude and temperature value. The temperature coloum is in cell type.
Then, each of row of cell coloumn consists of different number. Please see the picture.
Is there a way to do '-' (minus) operator between number inside cell in first column of Table A and Table B?
Thank you
2 Comments
Image Analyst
on 21 May 2021
Make it easy for us to help you. Please attach the table in a .mat file. I think you'll need to extract the cell array from the table first, then extract the contents of the cell arrays after that. Then do your math. Something like (untested) because you did not attach your data
ca1 = t{1, 1};
ca2 = t{2, 1};
if length(ca1) == length(ca2)
% Then do something like subtract them
contents1 = cell2mat(..............)
Ahmad Bayhaqi
on 22 May 2021
Accepted Answer
More Answers (0)
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!