how to enter a number in url

4 ビュー (過去 30 日間)
FIR
FIR 2014 年 3 月 16 日
回答済み: Image Analyst 2014 年 3 月 16 日
I have a url in that i want to type a number ,the number varies each time,if i enter it manually it works for ex
url='http://103.250.30.5/SendSMS/sendmsg.php?uname=XXX&pass=XXX&send=Alerts&dest=123456789&msg=Out time is 18.28'
web(url,'-browser')
dest is my mobile number,if i enter manually it works but i have saved it in variable A how to enter it tere
kindly help

採用された回答

the cyclist
the cyclist 2014 年 3 月 16 日
A = '123456789';
url=['http://103.250.30.5/SendSMS/sendmsg.php?uname=XXX&pass=XXX&send=Alerts&dest=',A,'&msg=Out time is 18.28']

その他の回答 (1 件)

Image Analyst
Image Analyst 2014 年 3 月 16 日
You can use sprintf():
url=sprintf('http://103.250.30.5/SendSMS/sendmsg.php?uname=%d&pass=%d&send=Alerts&dest=123456789&msg=Out time is 18.28', number1, number2);
number1 and number2 replace the %d's in the format string.

カテゴリ

Help Center および File ExchangeString Parsing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by