Can anyone solve this error
Show older comments
I am running the following code :-
cd E
clc,disp('Hello Neel\n Work hard and Learn More.')
beep off
addpath('C:\Users\USER\Documents\MATLAB\nth')
set(0,'DefaultFigureWindowsStyle','docked')
set(0,'DefaultFigureColormap',jet)
close all
And there is an error in "cd E' and 'Set command'
Following is the error shown in the command window
Error using cd
Cannot CD to E (Name is nonexistent or not a directory).
Error in startup (line 1)
cd E
Can anyone find out the error in the code??
Version:-
MATLAB Version: 8.1.0.604 (R2013a)
Answers (2)
Star Strider
on 23 Nov 2019
0 votes
Walter Roberson
on 23 Nov 2019
cd E
That would be an error if there is no subdirectory named E in your current directory.
Note that if you wanted to switch to drive E then you should use
cd('E:')
or better yet, provide a complete path, because when you CD to use a drive letter, CD returns to the last directory that was used for that drive (there is one current directory per drive.)
set(0,'DefaultFigureWindowsStyle','docked')
Correct is
set(0,'DefaultFigureWindowStyle','docked')
Note that this requires a somewhat recent version of MATLAB.
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!