How to replace table cell values with cell value multiplied by 0.0254?
2 次查看(过去 30 天)
显示 更早的评论
I want to look through the rows, find a specific text. If that text exists, then go to column 4 to 6 and replace those values by multiplying that value by 0.0254. How can I do that? I have this code but it doesn't work
num_rows = size(HabEx3P,1);
num_cols = size(HabEx3P,2);
for i = 1:1:num_rows
if ~exist('GRID','var')
for j = 4:1:6
HabEx3P(:,j) = HabEx3P(:,j).*0.0254;
end
end
end
3 个评论
Peter Perkins
2018-2-21
Please see my answer to your nearly identical question in another post you made yesterday:
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!