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

Answers (1)

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

Categories

Tags

No tags entered yet.

Asked:

on 1 Mar 2016

Answered:

on 2 Mar 2016

Community Treasure Hunt

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

Start Hunting!