Why do I get this xlswrite error?

조회 수: 1 (최근 30일)
Jonathan Babitsch
Jonathan Babitsch 2020년 6월 30일
댓글: Walter Roberson 2020년 6월 30일
Hey everybody,
quick question concerning the following problem:
I can't find my mistake here. Matlab keeps teeling me I have too many input arguements. In line 228 I want to write the Vector Kmittelpunkt to the Cells C5:E5 in excel.
In line 229 I only want to write one value named "angledeg" to the to Cell G5 in Excel.
Thanks a lot for your help in advance, I'm a beginner in Matlab and just don't see the problem.
Thanks a lot,
Johnny

채택된 답변

Walter Roberson
Walter Roberson 2020년 6월 30일
Either remove the keyword 'sheet' or else before the last input add the keyword 'range'. You can use positional arguments but as soon as you use the first keyword argument you have to stop using positionals.
  댓글 수: 2
Jonathan Babitsch
Jonathan Babitsch 2020년 6월 30일
Now I get the error message:
Input data must be numerical, cell or logical array...
What can I do about this?
Thanks in advance Walter!!
Walter Roberson
Walter Roberson 2020년 6월 30일
You cannot xlswrite() symbolic values. You would have to xlswrite() double() of the symbolic values.
The part of the symbolic value that appears on the screen is numeric and can be converted to double. If you have any unresolved symbolic variables and you want to write out formulas, then you need to do something like
C = arrayfun(@(formula) char(formula), Kmittelpunkt, 'uniform', 0);
and then C would be a cell array of character vectors that you could xlswrite(), provided that you are using MS Windows with Excel installed.
Note: these days we recommend using writetable() or writecell() or writematrix() instead of xlswrite()

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Standard File Formats에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by