Effacer les filtres
Effacer les filtres

how can I extract these cell array from

1 vue (au cours des 30 derniers jours)
Manav Divekar
Manav Divekar le 7 Déc 2021
Modifié(e) : Manav Divekar le 7 Déc 2021
how can i write a function for thi

Réponses (1)

Voss
Voss le 7 Déc 2021
function out = parse_url_options(url)
idx = find(url == '=');
s_idx = find(ismember(url,'?&'));
e_idx = find(ismember(url,'&#'));
ni = numel(idx);
out = cell(ni,2);
for i = 1:ni
out{i,1} = url(s_idx(find(s_idx < idx(i),1,'last'))+1:idx(i)-1);
out{i,2} = url(idx(i)+1:e_idx(find(e_idx > idx(i),1))-1);
end

Catégories

En savoir plus sur Programming dans Help Center et File Exchange

Tags

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by