Hi,
i successfully integrated my .NET Dll into MATLAB. Everything is good. But, i pass a System.Double with value like 6000.46, and return it in a MATLAB function as [valueFromDotNet] the ans of MATLAB is ans = 6000, but i expected at least ans = 6000.4600 has anybody an idea where i have to look?
EDIT 1: I ensured that the format is short. (if get(0,'Format')) and i also set the format long; Nothing has changed. Anybody an idea why this is happening.
EDIT 2: found the problem. I receive the data that i feed into MATLAB from an external service. the numbers there are formated as string, but always as "6000.46"; i parsed with CultureInfo.InvariantCulture, but that seemed to be wrong. Changed it to new CultureInfo("en-US"), and it works now!
EDIT 3: i was too excited. it's still stange. but i think it's now just a not knowing how mathlab works
i have this callback
function tbmxHandleTickEvent(source,arg)
t = arg.Tick;
[t.BidPrice t.AskSize t.AskPrice t.LastSize t.LastPrice]
end
the callback gets triggered by an .NET event using this, i get the prices values without the fraction
when i change the callback like this
function tbmxHandleTickEvent(source,arg)
t = arg.Tick;
t.BidPrice
end
the result is this price including the fraction