webread Error "Expected input to be a vector"
Mostra commenti meno recenti
Hi, I am getting an error when I use webread, but only on certain machines and in certain versions. What other things should I check?
I get this problem with Windows 10, Matlab R2017b, Windows 7 Matlab R2017b and R2018a
url = 'http://www.mathworks.com/matlabcentral/fileexchange';
searchTerm = 'sensor-data-acquisition';
html = webread(url,'term',searchTerm)
Error using webread (line 119)
Expected input to be a vector.
But it succeeds with Windows 10, Matlab R2018a
url = 'http://www.mathworks.com/matlabcentral/fileexchange';
searchTerm = 'sensor-data-acquisition';
html = webread(url,'term',searchTerm)}
html =
'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/> ... }
end
4 Commenti
Nanda Gupta
il 8 Mag 2018
I was not able to reproduce this on my end. Please try using the "weboptions" function with "webread" to see if you can still see this issue.
Example:
url = 'http://www.mathworks.com/matlabcentral/fileexchange';
searchTerm = 'sensor-data-acquisition';
options = weboptions('KeyName', 'term', 'KeyValue', searchTerm);
html = webread(url,options)
Maurice
il 14 Mag 2018
I have exactly the same problem and I would love a solution. Just running the webread examples generates this error. And I am using windows 10 and matlab 2018a, so I'm not sure this configuration is immune. The error seems to be when matlab calls its internal urlencode function, it doesn't believe that the first argument to webread is a string, which it clearly is. If there is anyone able to help out there, I would really appreciate it!
Maurice
il 14 Mag 2018
I have just solved my own problem ... in my case, I had an old version of strjoin.m in my path above the newer R2018b version ... I removed the offending version from the path and it now works for me ... perhaps you have a similar problem? Good luck ...
Risposte (0)
Categorie
Scopri di più su Startup and Shutdown in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!