Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8580733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:53:25+00:00 2026-06-11T20:53:25+00:00

When I enter edit somenewfile.m in my Matlab R2010a command window it gives me

  • 0

When I enter

edit somenewfile.m

in my Matlab R2010a command window it gives me this error

??? Error using ==> edit at 57
Neither 'somenewfile' nor 'somenewfile.m' could be found.

On my other computer with R2012a at work, this same command works and creates a new file.
Is there something different about 2010?

I tried fiddling around with edit.m for a little while, but I’m afraid I’m going to mess something up. Here is the part it is failing in

try
if (nargin == 0)
    openEditor;
else
    for i = 1:nargin
        argName = translateUserHomeDirectory(strtrim(varargin{i}));
        if isempty(argName)
            openEditor;
        else
            checkEndsWithBadExtension(argName);

            if ~openInPrivateOfCallingFile(argName)
                if ~openOperator(argName)
                    if ~openWithFileSystem(argName, ~isSimpleFile(argName))
                        if ~openPath(argName)
                            showEmptyFile(argName);
                        end
                    end
                end
            end
        end
    end
end
catch exception
    throw(exception); % throw so that we don't display stack trace
end

at ShowEmptyFile
while looks like

%--------------------------------------------------------------------------
% Helper function that displays an empty file -- taken from the previous edit.m
% Now passes error message to main function for display through error.
function showEmptyFile(file)
errMessage = '';
errID = '';

% If nothing is found in the MATLAB workspace or directories,
% open a blank buffer only if:
%   1) the given file is a simple filename (contains no qualifying 
%      directories, i.e. foo.m) 
%   OR 
%   2) the given file's directory portion exists (note that to get into 
%      this method it is implied that the file portion does not exist)
%      (i.e. myDir/foo.m, where myDir exists and foo.m does not).
[path fileNameWithoutExtension extension] = fileparts(file);

if isSimpleFile(file) || (exist(path, 'dir') == 7)

    % build the file name with extension.
    if isempty(extension) 
        extension = '.m';
    end
    fileName = [fileNameWithoutExtension extension];

    % make sure the given file name is valid.
    checkValidName(fileName);

    % if the path is empty then use the current working directory.
    % else use the fully resolved version of the given path.
    if (strcmp(path, ''))
       path = pwd;
    else
        whatStruct = what(path);
        path = whatStruct.path;
    end

    if (isempty(checkJavaAvailable) ...
            && com.mathworks.mde.editor.EditorOptions.getShowNewFilePrompt == false ...
            && com.mathworks.mde.editor.EditorOptions.getNamedBufferOption == ...
                com.mathworks.mde.editor.EditorOptions.NAMEDBUFFER_DONTCREATE ...
            && com.mathworks.mde.editor.EditorOptions.getBuiltinEditor ~= 0)
        [errMessage, errID] = showFileNotFound(file, false);
    else
        openEditor(fullfile(path,fileName));
    end
else
    [errMessage, errID] = showFileNotFound(file, false);
end
handleError(errMessage, errID);

Perhaps I have a bad edit.m? Or There was a setting that caused a new edit.m with code to throw an error? Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T20:53:26+00:00Added an answer on June 11, 2026 at 8:53 pm

    I get the same error message in 2010a (line 57 of edit.m) if I edit a non-existent file after unchecking the following option:

    File -> Preferences -> General -> Confirmation Dialogs -> Prompt when editing files that do not exist

    With that it mind, it sounds like you don’t have that option enabled?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When you enter edit mode for a UITableView (grouped but I believe this applies
I'm trying to enter edit mode on a specific cell like this: void MainWindow::on_addButton_released()
Possible Duplicate: Using SendMessage to enter text into an edit control belonging to another
Using cell edit mode in jqGrid , the default behaviour is to enter edit
We have a java based enterprise web application. User enter / edit data using
I have an input edit field where the user can enter data. I want
I have a program that I use to enter values into a database using
i want to change color of edit control when enter edit and when exit
http://dev.icalapp.rogersdigitalmedia.com.rogers-test.com/Edit.php When I enter numbers into that list and click submit it won't display
I have a form to edit employee information. If the user wishes to enter

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.