What can I do with a web browser handle?

1 view (last 30 days)
Philip M
Philip M on 2 Feb 2020
Edited: per isakson on 2 Feb 2020
So, the Matlab documentation tells you how to make a handle when opening a new webpage but, unless I missed it, doesn't give you a single example of what you can do with it once you have it. I happened to find this command on a different website which lets you assign a url to a specific handle:
setCurrentLocation(h,'http://website.com')
and I found some more really useful commands in this e-book:
s=char(h.getHtmlText); %gets source text from page with handle h
jDesktop=com.mathworks.mde.desk.MLDesktop.getInstance
jDesktop.removeClient(jBrowser2) %closes the browser tab of handle h
but none of them are listed in the Matlab documentation nor under the help command. Would I need to learn Java or something to learn what I can do when these things? I'm more than willing to do that, but I wouldn't mind having some quick answers so I can go ahead and finish what I'm working on. I've tried searching Google but the documentation for the Java commands I was able to find didn't give any sort of indication of what they would do in the context of a Matlab browser.
I wasn't aware of Matlab's integration with Java until now and it seems like there's some really neat stuff I could do with that, but I guess I just don't know where to get started.

Answers (1)

per isakson
per isakson on 2 Feb 2020
Edited: per isakson on 2 Feb 2020
Undocumented Matlab and this book might be the best sources of information on the use of Java in Matlab(, besides the Matlab documentation).
The File Exchange contains many submissions that make use of Java.
However, remeber that much of the graphic stuff is undocumented and could change without prior notice on any future Matlab release. See the preface of the book.
  2 Comments
Philip M
Philip M on 2 Feb 2020
This is great, thank you. Geez, every time I learn a new thing about Matlab I find 20 new things that I never would have anticipated. The best part is that almost nobody I work with knows how to do anthing with it beyond the basics, if even that. It's really helping me stand out at my job. After just a month or so of playing around with it, I'm comming up with more efficient solutions to problems and eliminating technical grunt work. I feel like I could build my whole career around this program. And the best part is that I legitimately enjoy it.
But anyway, Matlab advertisement over, can you recommend any other resources I could use to learn about other lesser-known features? I just can't get enough of this stuff.
per isakson
per isakson on 2 Feb 2020
Edited: per isakson on 2 Feb 2020
It's not rare that persons testify that Matlab has been important to their careers, e.g. Toby Driscoll. Currently, it seems as if Matlab is keeping up with the technical development and will not disappear anytime soon.
"more efficient solutions" I think you should invest in the Accelerating MATLAB Performance book
See MATLAB and Simulink Based Books. There are very few, if any, books on Matlab and software development. They are typically on using Matlab in a specific domain/field (or getting started with Matlab for graduate students). Don't underestimate the domain knowledge - whatever that is in your case.
If you think about becomming the Matlab guy at your workplace you should browse the blog Walking Randomly and read selected pieces. "nobody I work with knows how to do anything with it beyond the basics" your problem might be that they are happy with writing their scripts.
Much more important than "lesser-known features" is skill and knowledge on software development. Google for "Uncle Bob" and "Clean Code". Clever tricks is one thing, develop and maintain applications is something else.

Sign in to comment.

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!