How to creating MAT file
Mostrar comentarios más antiguos
This is my parameter
% Parameter Massa
m1 = 8095; % massa train set 1 dalam kg
m2 = 8500; % massa train set 2 dalam kg
m3 = 8457; % massa train set 3 dalam kg
% Parameter Gaya
f1 = 205.*10^3; % Gaya train set 1 dalam N
f2 = 302.*10^3; % Gaya train set 2 dalam N
f3 = 302.*10^3; % Gaya train set 3 dalam N
% Parameter Resistansi
c_0_1 = 0.01176;
c_1_1 = 0.00077616;
c_2_1 = 4.48 ;
c_0_2 = 0.01176 ;
c_1_2 = 0.00077616;
c_2_2 = 4.48;
c_0_3 = 0.01176 ;
c_1_3 = 0.00077616;
c_2_3 = 4.48;
% Desired Speed
v_0 = 300;
% Desired Train Following Headway Time
hstar = 120;
a_1 = -1./m1.*(c_1_1 + 2.*c_2_1.*v_0);
a_2 = -1./m2.*(c_1_2 + 2.*c_2_2.*v_0);
a_3 = -1./m3.*(c_1_3 + 2.*c_2_3.*v_0);
a_1_head = 1-(a_1.*hstar);
a_2_head = 1-(a_2.*hstar);
a_3_head = 1-(a_3.*hstar);
b = 1;
p_1 = -1./m1.*(c_0_1 - c_2_1.*(v_0).^2);
p_2 = -1./m2.*(c_0_2 - c_2_2.*(v_0).^2);
p_3 = -1./m3.*(c_0_3 - c_2_3.*(v_0).^2);
I want to save this parameter into MAT file extension
save valueparameters.mat
But it can't save it said permission denied
Error using save
Unable to write file valueparameters.mat: permission denied.
Error in valueparameters (line 44)
save valueparameters.mat
How I save the file with mat extension?
6 comentarios
Stephen23
el 19 de Oct. de 2020
What is your current directory? Please show us the output of this command:
pwd
Ivan Dwi Putra
el 19 de Oct. de 2020
Editada: Ivan Dwi Putra
el 19 de Oct. de 2020
Stephen23
el 19 de Oct. de 2020
"my current directory is G:/Ivan"
No, what you show is that your current directory is actually C:\Program Files\Polyspace...
"I save in my directory not in C:/ProgramFiles"
So far it seems very likely that you are trying to save this file in the installation folder of Polyspace. Bad idea.
Do NOT use this folder as your current directory!
Do NOT save/change any files in this folder!
Ivan Dwi Putra
el 19 de Oct. de 2020
"How i save not in installation folder?"
The simplest approach is to change the current directory to whatever directory you want to save your file in.
Do NOT use the installation folder of any application as the current directory.
Perhaps you ended up there by mistake, it really does not matter, the fact is, you need to change your current directory.
Ivan Dwi Putra
el 19 de Oct. de 2020
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Install Products en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

