I am receiving information from C program but cannot access the data

I am receiving information from C program but cannot access the data.
Matlab line
[ret1] = calllib('fc_matlab','stopPrices','none');
works well, but I have no idea how to get the return values. They are printed to Matlab as
fc_msg =
1, EUR/USD, Bid=1.087480, Ask=1.087600
I would appreciate you help,
Many thanks,
Leon

回答 (1 件)

Walter Roberson
Walter Roberson 2016 年 3 月 2 日

0 投票

datacell = textscan(fc_msg, '%f%sBid=%fAsk=%f','Delimiter',',');
quantity = datacell{1};
currency = datacell{2};
bid = datacell{3};
ask = datacell{4};

カテゴリ

ヘルプ センター および File ExchangeStartup and Shutdown についてさらに検索

タグ

タグが未入力です。

質問済み:

2016 年 3 月 1 日

回答済み:

2016 年 3 月 2 日

Community Treasure Hunt

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

Start Hunting!

Translated by