Error in c# connecting between matlab and C#
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi, Please anyone can solve this error .In connecting between C# and matlab . I don't usderstand the error .
See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.
************ Exception Text ************ System.Exception:
... MWMCR::EvaluateFunction error ... Error using ==> vertcat CAT arguments dimensions are not consistent..
at MathWorks.MATLAB.NET.Utility.MWMCR.EvaluateFunction(String functionName, Int32 numArgsOut, Int32 numArgsIn, MWArray[] argsIn)
at MathWorks.MATLAB.NET.Utility.MWMCR.EvaluateFunction(String functionName, MWArray[] argsIn)
at com.speechR.SpeechR.Recognition(MWArray speechIn, MWArray silence)
Thanks a lot:)
Nada Gamal
0 Kommentare
Antworten (1)
Kaustubha Govind
am 4 Mai 2011
It looks like the inputs that you are providing are causing a "vertcat CAT arguments dimensions are not consistent" error from MATLAB. It is hard to tell without looking at your code, but you may have a call to VERTCAT, or a statement that performs concatenation using something like:
out = [in1 in2];
Do you have the original MATLAB code? If yes, try constructing the same inputs in MATLAB and invoke the function to debug.
2 Kommentare
Kaustubha Govind
am 4 Mai 2011
My best bet is that the error comes from:
speechIn1 = [silence;speechIn];
If silence and speechIn have different sizes, then this works only if they are both column vectors. Not sure if they are passed in as row vectors from C# - you could try adding the following lines to the top of the MATLAB function, recompile, and try this again:
% Convert silence and speechIn to column vectors
silence = reshape(silence, [numel(silence) 1]);
speechIn = reshape(speechIn, [numel(speechIn) 1]);
Siehe auch
Kategorien
Mehr zu Deploy to .NET Applications Using MWArray API finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!