How can I open an url into matlab browser?

Hi all,
I have this code:
[stat, h] = web('https://www.cambriafunds.com/tail-holdings','-new');
By default, Matlab opens the url into Chrome browser. However, I need to open it into Matlab browser. How can I do it? Many thanks!
Regards

2 Comments

Not sure if matlab has a browser. I know it has a HTML Control but its not going to allow urls as i just tried. But im curious if someone has a solution for this. Maybe there's an addon to that embeds something like a Chromium Browser like the C# Nuget Packet "CefSharp Chromium Browser". Would be cool!
Of course Matlab has a browser

Sign in to comment.

 Accepted Answer

That will not be possible according to the documentation ... (cit: "If url is an external site, then the page opens in your system browser. ")...

5 Comments

Ok but why in Matlab 2021b it was possible and in Matlab 2022b not?
I mean, if I executed the code in Matlab 2021b the external url is opened in Matlab browser while in Matlab 2022b not.
This is interesting, I had a similar trouble in 2021, but in a deployed app, while the url wal a local file. Still, I was forced to use the system browser... Maybe you can forward this issue to your support as a development request.
DGM
DGM on 9 Nov 2022
Edited: DGM on 9 Nov 2022
I'm using R2019b, and web() opens external pages in an external browser. I would imagine that the reasoning is that the built-in browser is extremely limited and would likely not actually render most web pages correctly anyway. It's probably only intended for handling simple documentation pages, but that's just my guess.
It's possible but Matlab should be give the possibility to choose which browser to use. I opened a support ticket. Let you know!
OK, please accept the answer, if you agree...

Sign in to comment.

More Answers (1)

Khushboo
Khushboo on 9 Nov 2022
Edited: Khushboo on 9 Nov 2022
Hello,
I think you will have to set the MATLAB Browser as the default browser instead of chrome which can be done using the following steps:
  1. To use the MATLAB browser as the default browser for external sites, go to the Home tab.
  2. In the Environment section, click Preferences.
  3. Select MATLAB > Web and in the System Web browser section, clear the Use system web browser when opening links to external sites.
More details regarding this can be found here.
Hope this helps!

9 Comments

Adriano
Adriano on 9 Nov 2022
Moved: DGM on 9 Nov 2022
I don't find System Web browser section in Preferences. Please, take a look at the image attached below.
Jiri Hajek
Jiri Hajek on 9 Nov 2022
Moved: DGM on 9 Nov 2022
Hi, it looks like Khushboo might be using MATLAB on a LINUX or Mac system, where the settings are slightly different from Windows (see here). The web command also has some excaptions when you use it in online MATLAB or in deployed mode. And additionally, the MATLAB web browser has some limitations regarding content it is able to display. You may want to experiment with it manually, whether it is able to your desired page.
Adriano
Adriano on 9 Nov 2022
Moved: DGM on 9 Nov 2022
I use Matlab in deployed mode and my system is Windows.
However, I see that System Web Browser option desappear from Web menu when I update Matlab to 2022b version. When I was using Matlab 2021b I had that option (see image below).
Khushboo
Khushboo on 9 Nov 2022
Moved: DGM on 9 Nov 2022
Yes, I am using a Mac device and maybe that's why the settings are different. Although this seems more like a workaround, but maybe you can try using the R2021b version if you wish to use the MATLAB browser as it shows the option.
Adriano
Adriano on 9 Nov 2022
Moved: DGM on 9 Nov 2022
For many reasons it's a problem for me. I need to use Matlab 2022b and Matlab browser.
I have this problem too - no system web browser option in preferences. I am running 2023a on a Mac M1 Chip machine. MATLAB uses my system browser exclusively and I am unable to use the MATLAB browser and need the MATLAB browser to remember credentials in accessing a website with authentication. I vaguely remember being unable to use the system browser and found some tweak command to set the browser permanently to the system browser disabling the MATLAB browser but I can't find the documentation and see nothing relevant in my startup.m. Help appreciated!
I have the same problem. I need to open web in Matlab (2022a on Windows 11) browser so that I can use getTableFromWeb. But even when I clear the Preferences selection of 'use system web browsing when opening...', it still opens the link in the system web browser (I am using firefox).
I tried using command 'web' alone, then matlab browser opened a blank page.
Thanks and help please!
getTableFromWeb was last updated 8 years ago. I wouldn't expect it to work, and the comments on the FEX page suggest that indeed, it hasn't been working for years. It does not work for me in R2019b or R2015b, so I have no idea when this actually broke or why.
I think it's clear that finding a roundabout way to fix an old broken FEX tool that relies on MATLAB features which apparently don't exist anymore is probably going to be a colossal waste of time. If what you need is to get dynamically loaded content from a web page, then that should be the discussion. I don't know of a good solution, but for sake of attracting help, it should probably be in a new question which focuses on your specific needs.
That said, even if it's not an option anymore, perhaps it would be worthwhile to mention why getTableFromWeb seemed satisfactory for your needs.
Thanks for your quick reply and information. I would like to focus on the issue of opening a link in Matlab browser because as long as I could do that, my program using getTableFromWeb runs well without an error. With Matlab 2022a, I have tried opening Matlab browser manually (command 'web', barely), then my program ran well then. Therefore my question is (within this topic): with version 2022a, how can I open a link in Matlab browser by running script?
My need is to read data tables from webs periodically (and automatically) and getTableFromWeb is quite convinient. I do not know alternative ways to do so.
Thanks for your help!

Sign in to comment.

Categories

Find more on MATLAB Coder in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!