Demo entry 6850789

按格式拼接url

   

Submitted by anonymous on Jul 11, 2019 at 13:08
Language: Matlab. Code size: 458 Bytes.

[n,~]=size(a);
[m,~]=size(b);
A=char();
B=char();
for i=1:n
    A=[A,char(num2str(a(i,2),8)),char(","),...
        char(num2str(a(i,1),9)),char("|")];
end
for i=1:m
    B=[B,char(num2str(b(i,2),8)),char(","),...
        char(num2str(b(i,1),9)),char("|")];
end
A=A(1:end-1);
B=B(1:end-1);

AK='xU3VALUmNUQvxKP8BAeGt1LYn3C0t4nC';
URL='https://api.map.baidu.com/routematrix/v2/walking?';
fullURL=[URL,'origins=',A,'&destinations=',B,'&ak=',AK];

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).