file not found or permission denied

254 ビュー (過去 30 日間)
PA
PA 2023 年 5 月 12 日
回答済み: Shaik 2023 年 5 月 12 日
I get an error of permission denied and also it says not enough input arguments when i try to export an output file

回答 (1 件)

Shaik
Shaik 2023 年 5 月 12 日
Hi,
The "permission denied" error occurs when the user who is running the MATLAB program does not have write permissions for the directory where the output file is being created. To fix this error, you should check the write permissions of the directory and make sure that the user running the MATLAB program has write permissions.
Here is an example code snippet that uses the dlmwrite function to write a matrix to a text file:
% Generate a matrix
A = rand(4);
% Specify the filename
filename = 'output.txt';
% Write the matrix to the file
dlmwrite(filename, A);

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by