writeTable won't take my parameters
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
titles={'the' 'hungry' 'dog'}
a=['22b' ; '22c' ; '22d']
b=['23d' ; '23e' ; '34f']
myData=table(a,b, 'VariableNames', titles);
writeTable(myData ,' 'myData.xlsx');
Error using table (line 255)
Wrong number of arguments.
Hi all, this is my code it won't run for some reason
Thanks
0 Kommentare
Antworten (1)
Star Strider
am 21 Aug. 2019
The error was with table, not writetable. You are not creating the table correctly.
Try this:
titles={'the' 'hungry' 'dog'}
a={'22b' ; '22c' ; '22d'}
b={'23d' ; '23e' ; '34f'}
myData = array2table([a, b]', 'VariableNames', titles)
producing:
myData =
2×3 table
the hungry dog
_____ ______ _____
'22b' '22c' '22d'
'23d' '23e' '34f'
that I assume is what you want.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Tables finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!