Changing <undefined> in a table to NA

Hello. I feel this should not be too hard but I still can't seem to figure it out. I have a 2500x14 table, in random spots throughout the table some are '<undefined>', I want to change all of those undefined to 'NA'. I tried working with isundefined but always end up with an error. Thank you in advance for the help!

 Accepted Answer

I suggest trying to use fillmissing.
B = fillmissing(A,'constant','NA');

3 Comments

Thank you. I tried
B=fillmissing(A(:,7),'constant','NA');
becuase right now I am just trying for the 7th column but it doesn't change anything and I am not receiving an error either. Any ideas on what I could be missing?
Never mind I got it working now. Thank you so much for the help!
Could you please share your solution?

Sign in to comment.

More Answers (0)

Categories

Find more on Mathematics 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!