I need help setting my current directory and loading data.
2 次查看(过去 30 天)
显示 更早的评论
UPDATE: I have solved the issue and no longer need any help! :)
Hello,
I keep trying to set my current directory and load the data like this:
>> cd '/Users/marymadelynnlupton/Desktop/FALL 2020/Probs. & Stats./MatLab Projects/Project 2'
load ECE2523_Project2_Data; %loading newSurveyData to my workspace
But I keep getting this error:
Error using load
Unable to read file 'ECE2523_Project2_Data'. No such file or directory.
I am not sure what's going on. I am positive I saved the data file it in the same directory as my script is saved.
0 个评论
采纳的回答
VBBV
2020-9-8
编辑:VBBV
2020-9-8
Type
% if true
% code
% end
>> pwd
>> ls *.*
at the command window After setting the folder path where you saved the files
Then locate the file which you want to load into workspace
2 个评论
VBBV
2020-9-8
编辑:VBBV
2020-9-8
if you are able to view the filename in the specified folder then do the following. Use the function form instead of command form which you are doing
%if true
% code
%end
load('ECE2523_Project2_Data.mat')
% use function form instead of command form when the filename is a string
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Search Path 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!