Matlab file saving permission denied problem.
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I do the following code but when I try to save the 'database' the result is coming out as "Unable to write file database: permission denied."
I can't understand why this happens. please help me.
This is my code:
clear
clc
%store features
for i=1:3
filename=strcat('D:\Project\Matlab files\Youtube code\ku', num2str(i),'.wav');
b = audioread(filename);
%[z, fs(1)]= audioread(filename);
%sound(z, fs(1))
FE=VoiceFeatures(b);
try
load database
F=[F;FE];
FN=[FN;i];
database=[database;F;FN];
save database
catch
F=FE; %Features
FN=i;
save database
end
end
and this is showing in command window:

0 Kommentare
Antworten (1)
Image Analyst
am 7 Jan. 2023
Look like you might have the file open in MATLAB or in some other program, like the operating system's media player program so it's locked and you can't change it. Make sure it's not open in any other program. Then try putting
fclose('all');
at the beginning of your program. If it's open in MATLAB, this should close it.
Attach database.mat if you still have trouble.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Introduction to Installation and Licensing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!