필터 지우기
필터 지우기

How can i edit my code which works on r2014b version at work but not on my personal r2024a version?

조회 수: 99 (최근 30일)
I have an IAD code, number of lines long. It works great on the MATLAB r2014b version but on my r2024a version at home, i get an error of the following:
Running IAD on dataset 1
zsh:1: command not found: iad
Sample1_IAD.txt
Error using movefile
No matching files named 'XXXXXX' were found.
Error in IAD_Analyzer_WCV_04_11_23 (line 239)
movefile(iad_output_file,strcat([pwd, '\results']))
Please can someone well versed in MATLAB suggest what I should change in the code to address this error in the r2024a version? It seems to be a matter of changing file location or using a different cmd from 'movefile' etc but I've tried all I know to do with no success. Thank you, I appreciate any help.
  댓글 수: 2
Walter Roberson
Walter Roberson 2024년 7월 19일 18:37
movefile(iad_output_file,strcat([pwd, '\results']))
You should be using fullfile() instead
movefile(iad_output_file,fullfile(pwd, 'results'))
Oluwadamilola Oke
Oluwadamilola Oke 대략 5시간 전
Hi Walter, thank you. Unfortunately, this did not work. MATLAB gives the same error but this time with the fullfile()

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

답변 (1개)

Fangjun Jiang
Fangjun Jiang 2024년 7월 19일 16:54
No matching files named 'XXXXXX' were found.
This is the error. It should give you a clue.
Put a break point at line 239 where the movefile() is. Let it run and pause at line 239. Make sure both the source and destination exist.
  댓글 수: 5
Oluwadamilola Oke
Oluwadamilola Oke 대략 3시간 전
Thank you both. Exist(iad_output_file) gives me 0, the latter gives me a non-zero number. I think this is the problem as Walter mentioned, I do have a .exe file in the folder but after checking it seems it is empty. After reading online, it seems mac systems are not equipped for running .exe files which may be the reason the current file in my folder is empty.
Walter Roberson
Walter Roberson 대략 2시간 전
Mac do not run .exe (not unless you have Parallels or equivalent installed)

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

카테고리

Help CenterFile Exchange에서 Data Import and Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by