How upload a text file?

5 ビュー (過去 30 日間)
Rute Lopes
Rute Lopes 2019 年 11 月 13 日
コメント済み: Walter Roberson 2019 年 11 月 13 日
I have a txt. file that I want to load into my script. I imported this txt.file as a matrix i all my script worked. However, i tried to run my script in another computer and it did not work. Is there another method to import a file that will always available?
% The function "save" is used to write data from the matrix imported
% (dataPS2)to a data file (vardata.dat)
% Then, that data file is loaded
save vardata.dat dataPS2 -ascii
load vardata.dat
Error in script (line 4)
save vardata.dat dataPS2 -ascii
  2 件のコメント
Walter Roberson
Walter Roberson 2019 年 11 月 13 日
The save would fail if there were no write access to the current directory.
Walter Roberson
Walter Roberson 2019 年 11 月 13 日
Why go through this instead of just using
vardata = dataSP2;

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

回答 (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