Is MATLAB not case sensitive while using function load

I stored a file with name 'NOISY_CHANNEL_30DB' However I can load file by specifying the path as follows:
a=load('D:\NOISY_CHANNEL_30dB.mat');
and
B=load('D:\NOISY_CHANNEL_30DB.mat');
and when I print the values of both the variables it is same.

댓글 수: 4

Dyuman Joshi
Dyuman Joshi 2024년 5월 28일
편집: Dyuman Joshi 2024년 5월 28일
Yes, MATLAB is case sensitive with regards to file names - https://in.mathworks.com/matlabcentral/answers/103146-is-matlab-case-sensitive.
But your OS might not be case sensitive and thus might have overwritten the same file or renamed it.
"and when I print the values of both the variables it is same."
It just might be that the values are equal.
Keep in mind that values displayed are not the same as values stored.
ANUSAYA SWAIN
ANUSAYA SWAIN 2024년 5월 28일
편집: ANUSAYA SWAIN 2024년 5월 28일
'It just might be that the values are equal.' I do not have any other file with same name. And same happened when i loaded the file using mat73 function in Python
I think you replied to a wrong part of my comment.
"And same happened when i loaded the file using mat73 function in Python"
Then, once again, the values might just be equal.
How did you ensure that the values are not equal in the first place?
"and when I print the values of both the variables it is same."
Of course they are the same: you loaded one file into two different variables. If they were different... that would be a problem.

댓글을 달려면 로그인하십시오.

답변 (1개)

Lokesh
Lokesh 2024년 5월 28일

0 개 추천

Hi Anusaya,
The behavior you described with the 'load' function is related to the file system, not MATLAB itself. On Windows systems, file names are case-insensitive, while on UNIX systems, they are case-sensitive. So, when you load a file using 'load', the case of the file name doesn’t matter because the operating system handles it.
Please refer to the discussion in the following MATLAB Answer for more information:

카테고리

도움말 센터File Exchange에서 Call Python from MATLAB에 대해 자세히 알아보기

질문:

2024년 5월 28일

댓글:

2024년 5월 28일

Community Treasure Hunt

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

Start Hunting!

Translated by