MATLAB: How to replace [ ] in an array with 0’s

arrayemptyzero

How can i replace the [] in the pathrisk field with 0's?
Thanks for your help!

Best Answer

for i = 1:length(pathrisk)
if isempty(pathrisk(i))
pathrisk(i) = 0;
end
end