Publish tab is missing
20 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I don't seem to have a Publish tab in Matlab. How do I find or install it? TIA
2 comentarios
Respuestas (1)
Sean de Wolski
el 18 de Jul. de 2013
Editada: Sean de Wolski
el 18 de Jul. de 2013
Run the following at the command line:
edit sfdslkjflksjf
(Accept the prompt)
Does the publish tab show up? If it does, the reason it wasn't showing up was likely because the file in the editor did not have the extension *.m. The publish tab doesn't show up for *.txt, *.c, *.cpp etc. just *.m
If it doesn't show up with that, something has corrupter your preferences directory. Save the following and run it, it will clear this directory and will fix the issue:
function moveprefdir(restart)
%MOVEPREFDIR - Rename preferences directory and optionally restart MATLAB
%
% MOVEPREFDIR renames the current prefdir to [current_name date_time]
% and restarts MATLAB if you wish. Restarting MATLAB is required
% to regenerate preferences.
%
%Usage: MOVEPREFDIR
% MOVEPREFDIR(restart)
%
%Inputs:
% -restart: optional, logical scalar:
% Do you want to restart MATLAB automatically?
% {default: prompt user}
%
%Outputs:
% -No outputs but gives you a message box with details
%
%See also: prefdir movefile
%
%
%Sean de Wolski - Copyright, The MathWorks, Inc 12/10/2012
%
%Error Checking and defaults:
assert(any(nargin==[0 1]),'One or Zero inputs expected');
if nargin == 1;
assert(isscalar(restart) && islogical(restart),'If supplied, restart is supposed to be logical scalar');
prompt = false;
else
prompt = true;
end
%Move the preferences directory:
old_prefdir = prefdir;
new_prefdir = [prefdir, datestr(now,'ddmm_hhMM')];
[status, msg] = movefile(old_prefdir,new_prefdir);
%Display results:
if status
h = msgbox(sprintf('Old PREFDIR: %s renamed to %s',old_prefdir,new_prefdir),'Move Successful','modal');
waitfor(h);
else
errordlg(msg,'Move Failed','modal');
return;
end
%Prompt for restarting:
if prompt
choice = questdlg(sprintf('Restarting MATLAB is required to regenerate Prefences\nDo you want to restart MATLAB now?'),'Restart?','Yes!','No','Yes!');
restart = strcmp(choice,'Yes!');
end
%Restarting:
if restart
system('matlab &'); %Open new ML session
exit; %Leave this one
end
end
0 comentarios
Ver también
Categorías
Más información sobre Startup and Shutdown en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!