How can I open an url into matlab browser?
Show older comments
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
Marcel
on 8 Nov 2022
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!
Adriano
on 8 Nov 2022
Accepted Answer
More Answers (1)
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:
- To use the MATLAB browser as the default browser for external sites, go to the Home tab.
- In the Environment section, click Preferences.
- Select MATLAB > Web and in the System Web browser section, clear the Use system web browser when opening links to external sites.
Hope this helps!
9 Comments
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.
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.
Duncan Carlsmith
on 23 Apr 2023
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!
Viet Ha Tran
on 2 Mar 2024
Edited: Stefanie Schwarz
on 25 Sep 2024
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!
DGM
on 2 Mar 2024
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.
Viet Ha Tran
on 2 Mar 2024
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!
Categories
Find more on MATLAB Coder in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
