Replacing numbers in dataset by string
Show older comments
Hello, could you help me please with this code:
for i=1:length(inoperationDatatree1.SystemSlices)
if (inoperationDatatree1.SystemSlices(i)>0 && inoperationDatatree1.SystemSlices(i)<=50)
inoperationDatatree1.SystemSlices(i)={'<=50'};
elseif (inoperationDatatree1.SystemSlices(i)>51 && inoperationDatatree1.SystemSlices(i)<=100)
inoperationDatatree1.SystemSlices(i)={'50...100'};
elseif (inoperationDatatree1.SystemSlices(i)>101 && inoperationDatatree1.SystemSlices(i)<=150)
inoperationDatatree1.SystemSlices(i)={'101...150'};
else inoperationDatatree1.SystemSlices(i)={'>150'};
end
end
I need to replace each of row by interval...
2 Comments
David Young
on 30 Jan 2016
Storing those strings is an unusual thing to want to do. Can you explain what the purpose is, because there might be a much better way to solve the underlying problem.
Radoslav Vandzura
on 30 Jan 2016
Accepted Answer
More Answers (0)
Categories
Find more on Tables 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!