Publish tab is missing

조회 수: 20 (최근 30일)
Beth
Beth 2013년 7월 17일
I don't seem to have a Publish tab in Matlab. How do I find or install it? TIA
  댓글 수: 2
Jan
Jan 2013년 7월 17일
Please mention the version of your Matlab.
Beth
Beth 2013년 7월 17일
R2013a

댓글을 달려면 로그인하십시오.

답변 (1개)

Sean de Wolski
Sean de Wolski 2013년 7월 18일
편집: Sean de Wolski 2013년 7월 18일
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

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by