MATLAB not saving files

I am having some trouble saving a file.
Here is the code I am trying to save (the custom functions are in the same Documents folder that I am trying to save in):
syms L ang1 ang2 h d r s x1 y1 x2 y2 A B C D E F G H
% declare known variables if any
%set up relations
s = 1;
ang1 = 30;
h = 10;
%r = s*(sqrt(2)/2)
%r = sqrt(a^2 + b^2)
%ang1 = 2*asind(d/(2*r))
%L = sqrt((h^2)+(d^2))
%ang2 = ((180-ang1)/2)-45
x1 = s/2;
y1 = s/2;
%rotation of top from bottom
x2 = x1*cosd(ang1) - y1*sind(ang1);
y2 = x1*sind(ang1) + y1*cosd(ang1);
%establishment of joints
A = [x1,y1,0];
B = [x1,-y1,0];
C = [-x1,-y1,0];
D = [-x1,y1,0];
E = [x2,y2,h];
F = [y2,-x2,h];
G = [-x2,-y2,h];
H = [-y2,x2,h];
%label joints
label_joint(A,'A')
label_joint(B,'B')
label_joint(C,'C')
label_joint(D,'D')
label_joint(E,'E')
label_joint(F,'F')
label_joint(G,'G')
label_joint(H,'H')
%establishment of members
plot_truss_element(A,E,'AE')
plot_truss_element(B,F,'BF')
plot_truss_element(C,G,'CG')
plot_truss_element(D,H,'DH')
plot_truss_element(A,B,'AB')
plot_truss_element(B,C,'BC')
plot_truss_element(C,D,'CD')
plot_truss_element(D,A,'DA')
plot_truss_element(E,F,'EF')
plot_truss_element(F,G,'FG')
plot_truss_element(G,H,'GH')
plot_truss_element(H,E,'HE')
plot_truss_element(E,D,'tED')
plot_truss_element(H,C,'tHC')
plot_truss_element(G,B,'tGB')
plot_truss_element(F,A,'tFA')
I try to save, I type in a name, I click save, and nothing changes. The window remains unsaved, and the heading remains as "Untitled*". Any suggestions?

1 comentario

Walter Roberson
Walter Roberson el 25 de Nov. de 2013
What directory are you trying to save into? If it is under Program Files then you will not be able to save there.
Also, if any syntax errors are showing, you will not be able to save.

Iniciar sesión para comentar.

Respuestas (1)

d p
d p el 13 de Sept. de 2016

0 votos

same question, r2016a, a blank file cannot save, and typing only
x=1
cannot save. my workaround is right clicking and saving a new file.

Categorías

Más información sobre Entering Commands en Centro de ayuda y File Exchange.

Productos

Etiquetas

Preguntada:

el 25 de Nov. de 2013

Respondida:

d p
el 13 de Sept. de 2016

Community Treasure Hunt

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

Start Hunting!

Translated by