Error in c# connecting between matlab and C#
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Kaustubha Govind
el 4 de Mayo de 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 comentarios
Kaustubha Govind
el 4 de Mayo de 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]);
Ver también
Categorías
Más información sobre Deploy to .NET Applications Using MWArray API en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!