I need help setting my current directory and loading data.

조회 수: 2 (최근 30일)
Mary Evans
Mary Evans 2020년 9월 8일
편집: VBBV 2020년 9월 8일
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.

채택된 답변

VBBV
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
Mary Evans
Mary Evans 2020년 9월 8일
I still got the same error :( Thank you though! :)
VBBV
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 CenterFile Exchange에서 Search Path에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by