Can anyone solve this error
1 回表示 (過去 30 日間)
古いコメントを表示
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)
0 件のコメント
回答 (2 件)
Walter Roberson
2019 年 11 月 23 日
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.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Startup and Shutdown についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!