how to view content of my cell table

5 views (last 30 days)
Hi there can anyone help me figure out how to show the content of my table? this is the code I have at the moment and I also attached my results
%--FIND NaN ROWS THEN DELETE ENTIRE ROW
PCBAllDataSet = readtable('testfile5.csv');
%imports the only columns needed
PCBRequiredCol = PCBAllDataSet(:,{'PcbTestID','PcbID','Verify12VInput','VerifyCurrentDraw'});
%remove row that contains NaN value
PCBRemoveNaNRow = rmmissing(PCBRequiredCol);
%--REMOVE ROW DUPLICATIONS
%create another table for keyset and valueset
%duplications will be removed as the table is made
newTable = containers.Map('KeyType','char','ValueType','any');
%forloop to assign key and value set on every row
for i = 1:size(PCBRemoveNaNRow,1)
keyID = char(table2cell(PCBRemoveNaNRow(i,2)));
%current(i) row, 3rd column to end column
valueSet = PCBRemoveNaNRow(i,3:end);
newTable(keyID) = valueSet;
disp(newTable)
end
%creates the table
bigTable = table(newTable.values);
splittingColumns = splitvars(bigTable)
HERE ARE MY RESULTS:
bigTable =
table
Var1
_________________________________________
[1×2 table] [1×2 table] [1×2 table]
splittingColumns
splittingColumns =
1×3 table
Var1_1 Var1_2 Var1_3
___________ ___________ ___________
[1×2 table] [1×2 table] [1×2 table]
It keeps coming up with a [1x2 table] but I want too be able to look at the value/content of whats inside that two column. Can anyone please suggest something?
  1 Comment
Andrea Del Rosario
Andrea Del Rosario on 11 Jan 2019
Attached the testfile if anyone wants to play around what im after :(

Sign in to comment.

Accepted Answer

Luna
Luna on 11 Jan 2019
Try this in the last section:
%creates the table
temp = newTable.values;
bigTable = [];
for i = 1:numel(temp)
bigTable = [bigTable; temp{i}];
end
  2 Comments
Andrea Del Rosario
Andrea Del Rosario on 12 Jan 2019
that worked very well thank you so so much!

Sign in to comment.

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!