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개)

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

카테고리

도움말 센터File Exchange에서 Startup 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