Open and run a datafile with matlab compiled exe file
조회 수: 6 (최근 30일)
이전 댓글 표시
Hi, I am trying open a datafile(structural) with my test.exe file, which has been compiled by matlab. Each time I start the test.exe file, it takes 1-5 minutes. So, I am trying to upload the datafile.xyz and run a function, without re-opening test.exe.
So, my test.exe has a function
function read_data()
I want to double click datafile.xyz to run the function read_data() in test.exe, and read the structural data from datafile.xyz, and do further process. I don’t know where to start. Does matlab have some functions for this, or is it possible through powershell script?
댓글 수: 4
Rik
2022년 1월 23일
Making sure your GUI behaves as a singleton is surprisingly hard. You could circumvent it by using uigetfile.
답변 (1개)
Pratyush
2024년 1월 18일
Hi Mubin,
To open ".xyz" files with your "test.exe" MATLAB compiled application and automatically run a function, follow these steps:
- Modify your MATLAB function to accept the file path as an input argument.
- Recompile your MATLAB application to accept command-line arguments.
- Optionally, create a wrapper script (batch or PowerShell) to call `test.exe` with the file path.
- Associate the ".xyz" file extension with "test.exe" or your wrapper script using Windows file associations.
- Double-click a ".xyz" file to test if it opens with "test.exe" and correctly passes the file path to your function.
Hope this helps.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 MATLAB Compiler에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!