Writetable() Error - Input must be a row vector of characters

I am getting this error.
Input must be a row vector of characters.
Here is the code, handles.ValleySegmentArray is 2 columns with numbers in them no text.
ValleySegmentArray = handles.ValleySegmentArray;
CTable = table(ValleySegmentArray);
writetable(CTable,location,'Sheet',1);
Any Thoughts?

Answers (1)

Jan
Jan on 10 May 2018
Edited: Jan on 10 May 2018
What is your variable location? The 2nd argument must be the file name, which must be provided as row vector of type char. Check this by using the debugger: Type this in the command window:
dbstop if error
Then run the code again until it stops at the problem. Now check the variable:
class(location)
size(location)
I send an enhancement request to TMW to improve the error message.

Categories

Find more on MATLAB Coder in Help Center and File Exchange

Products

Asked:

on 21 Jan 2015

Edited:

Jan
on 10 May 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!