Using dlmwrite to save data?

3 ビュー (過去 30 日間)
Emanuele Joy
Emanuele Joy 2018 年 5 月 18 日
編集済み: per isakson 2018 年 5 月 18 日
My dlmwrite function seems to not be able to run. To my understanding, dlmwrite is used to write a new .txt file containing the data of interest, right? When I try to dlmwrite, it says I have too many output arguments.
My code: https://pastebin.com/
The original script integrates data of tea spill that I read in (TeaSpill.txt), and I'm trying to use dlmwrite to write another .txt file of the spillLength values as more of an exercise to using dlmwrite. The code works perfectly fine up until dlmwrite. Can anyone tell me what I'm doing wrong? Thank you.
Shouldn't be pertinent but this is the TeaSpill.txt: https://pastebin.com/hVPssVdw
------------
My output:
Area of tea spill: 88.278 cm^2
Error using dlmwrite
Too many output arguments.
Error in HW6ProbEC1 (line 20)
spillData = dlmwrite('spillData.txt',spillLength,
'delimiter',' ');
>>
  1 件のコメント
KSSV
KSSV 2018 年 5 月 18 日
We are unable to find your code.....Why don't you copy paste your code here? You have an option of pasting your code here.

サインインしてコメントする。

採用された回答

per isakson
per isakson 2018 年 5 月 18 日
編集済み: per isakson 2018 年 5 月 18 日
"Too many output arguments." Remove the output, i.e. replace
spillData = dlmwrite('spillData.txt',spillLength,'delimiter',' ');
by
dlmwrite('spillData.txt',spillLength,'delimiter',' ');

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeText Files についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by