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
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
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
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.
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
Baycrest is an academic health sciences centre fully affiliated with the University of Toronto
Privacy Statement - Disclaimer - © 1989-2025 BAYCREST HEALTH SCIENCE. ALL RIGHTS RESERVED