필터 지우기
필터 지우기

Seeking help to automate a simple process if possible

조회 수: 2 (최근 30일)
John
John 2012년 3월 15일
Hello,
I'm using a software that is based on the Matlab environment.
I have a simple problem that I was hoping somebody might be able to help me with.
I use a built in function called "import_drive_cycles" in order to generate two files that are necessary for a simulation.
I can do it manually no problem, but I have 2,000 files so I am hoping to automate it, if I can.
The files are named cycle1.mat....cycle2000.mat
Here is screen shot of the process.
So I type "imort_drive_cycles" and a window pops up and I select a file, for example cycle1.mat http://dl.dropbox.com/u/54057365/All/matlab1.jpg
Then, it asks me, do I want to use the default path, and I click "Yes".
So I am wondering is there anyway that I can do this automatically for the 2,000 files in the folder?
I have little programming experience but keen to learn.
Thank you in advance
John

답변 (2개)

Matt Kindig
Matt Kindig 2012년 3월 15일
For automation, it would be a lot easier if you can call the function from the command line, without having to do any of the mouse clicks (i.e., navigate to the directory and click the path confirmation). Do you have access to the source? Could you post it?
  댓글 수: 2
John
John 2012년 3월 15일
Hello Matthew,
Thank your for your reply. I assume the only way of getting around the mouse clicks is to change the source code. I've contacted the software developer about where the code for this process is located. I'll re-post shortly.
Thank you
Regards
John
Matt Kindig
Matt Kindig 2012년 3월 15일
The other option you can do to replicate a mouse click involves the use of the java Robot class, but that way is a lot more complicated. It would be easier just to modify the source code. Let me know when you get any information from the software developer.
Regards,
Matt

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


Sean de Wolski
Sean de Wolski 2012년 3월 15일

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by