MATLAB: How to merge two columns of a table into a single column

table

Dear Experts,
I have a table, tableA of 3 columns. There are empty values in the first 2 columns and I want to merge the first 2 columns into a new columns such that there are no empty values.The table is shown below
Asset1 Asset2 Score
Appl Appl 10
IBM " 2
" Google 5
Dell Dell 4
Desired output
Asset Score
Appl 10
IBM 2
Google 5
Dell 4
I think "join" or "outerjoin" wont be able to do it.
Thanks

Best Answer

Letting T be the table:
v = cellfun(@isempty, T.Asset1)+1;
r = [T.Asset1, T.Asset2];
good_asset = r(sub2ind(size(r), (1:size(r,1)).', v));
result = table(good_asset, T.Score, 'VariableNames', {'Asset', 'Score'});