writetable does not work. Error: Search term must be a text or pattern scalar.
13 views (last 30 days)
Show older comments
Armando Angulo
on 4 Aug 2023
Commented: Armando Angulo
on 4 Aug 2023
writetable() does not write the table in my matlab2023a. It created an empty file and in the command propt this message is printed: "Search term must be a text or pattern scalar." This message does not have an "Error" label, but is red as an error.
This happen even with very simple tables as the next ones:
t=table([1:10;11:20]);
writetable(t,'t.csv')
0 Comments
Accepted Answer
Walter Roberson
on 4 Aug 2023
You have a third-party toolbox that is defining a function with the same name as a Mathworks-supplied function, and that is leading to problems.
As an experiment try
restoredefaultpath; rehash toolboxcache
and then re-run your experiment. If it now works, then you definitely have something on your path that is interfering. (If it still does not work, then the interfering file might be in the current directory.)
I suspect that in your case, the interferring function is named pattern.m but I am not at all certain about that.
Do you have SPM or dfield8 installed?
More Answers (0)
See Also
Categories
Find more on Testing Frameworks 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!