Back to PLS Help

pls_analysis for ERP from commandline
jacanterbury
Posted on 09/17/17 08:00:54
Number of posts: 5
jacanterbury posts:

Hi,

i want to run pls_analysis() on a remote server with no facility for opening windows.

pls_analysis() called from erp_analysis() needs a valid graphics handle in opt.progress.hdl though.

which is used on line 363:

         if isempty(progress_hdl) | ~ishandle(progress_hdl)
            error('Field "progress_hdl" should be a GUI handle');
         end

I'm not an especially accomplished Matlab programmer - can you think of a way around this? I just want to pull the result.perm_result.sprob values from the resulting datastructure and don't need any of the graphic interface features at this point.

I can fake this on my local PC by just running up plsgui in the background to endure that the handle is valid but I'm pretty sure this this approach won't work on the server.

I was wondering about just editing the pls_analysis.m file to take out the check but wan't sure how this might cascade.

Many thanks,

John

Replies:

Untitled Post
rmcintosh
Posted on 09/17/17 08:17:26
Number of posts: 394
rmcintosh replies:

Hi John - you don't need the graphics windows to view the results so can just load the results file into matlab and view the variables you want to see by typing their name on the matlab command line



Untitled Post
jacanterbury
Posted on 09/17/17 08:46:07
Number of posts: 5
jacanterbury replies:

quote:

Hi John - you don't need the graphics windows to view the results so can just load the results file into matlab and view the variables you want to see by typing their name on the matlab command line

Thanks for the quick reply.

sorry for not being clearer with my question. The problem I had was in running pls_analysis() to run the analysis, not with looking at the results that it returned. so a call like this

my_results = pls_analysis( my_datamatrix_list, num_subjext_list, num_conditions, my_opt )

where my_opt is a data structure that includes progress_hdl which needs to be a valid handle to a window.

If I want to run it silently I can't give it a valid value for progress_hdl so I was wondering how I get around this?

 

Cheers,

John

 

 

 



Untitled Post
rmcintosh
Posted on 09/17/17 08:51:44
Number of posts: 394
rmcintosh replies:

quote:

Thanks for the quick reply.

sorry for not being clearer with my question. The problem I had was in running pls_analysis() to run the analysis, not with looking at the results that it returned. so a call like this

my_results = pls_analysis( my_datamatrix_list, num_subjext_list, num_conditions, my_opt )

where my_opt is a data structure that includes progress_hdl which needs to be a valid handle to a window.

If I want to run it silently I can't give it a valid value for progress_hdl so I was wondering how I get around this?

 

Cheers,

John

 

 

 

Ah, I see.  If you run it from the command line you shouldn't need to specify a value for "progress_hdl".  From the command line type: 'help pls_analysis" and you will get a list of variables that you can specify.  This assumes that you have the datamat in the matlab workspace already.



Untitled Post
jacanterbury
Posted on 09/17/17 09:26:31
Number of posts: 5
jacanterbury replies:

Got it!

I was just using the opt 'that I'd saved from running it in gui mode (having stuck a break point in to stop at the pls_analysis() call)

Simply deleting the handle parameter completely from the opt structure did the trick.

Thanks for your help,

John

 




Login to reply to this topic.

  • Keep in touch

Enter your email above to receive electronic messages from Baycrest, including invitations to programs and events, newsletters, updates and other communications.
You can unsubscribe at any time.
Please refer to our Privacy Policy or contact us for more details.

  • Follow us on social
  • Facebook
  • Instagram
  • Linkedin
  • Pinterest
  • Twitter
  • YouTube

Contact Us:

3560 Bathurst Street
Toronto, Ontario
Canada M6A 2E1
Phone: (416) 785-2500

Baycrest is an academic health sciences centre fully affiliated with the University of Toronto