matlab-deployment

How to change the Value of a struct with a function in Matlab?

孤街浪徒 提交于 2021-02-05 11:13:27
问题 s= struct('Hello',0,'World',0); for i = 1: 5 s_vec(i) = s; end I have definied a struct in Matlab within a script. Now i want to implement a function witch change the Value of the Parameters. For example: function s_struct = set_s (number, prop , value) s_struct(number).prop = value; But the function returns a new struct. It does not change my input struct. Where is my mistake? 回答1: I'am not sure to totally understand your question, but if you want to update a parameter in a structure, you

`mlx` interface for Java packaging of Matlab functions?

左心房为你撑大大i 提交于 2021-01-29 08:00:39
问题 I am looking at the Matlab information on packaging functions for invocation from Java, specifically in the context of a variable number of input arguments. A number of function signatures are for "mlx interface", but there is no explanation of what this means. Web searching shows that *.mlx is file extension of Jupyter-like file for Matlab code. It is unclear whether this has anything to do with the use of this acronym in the interface documentation cited above. The manner in which it is

Non-constant Torque issue in FOC algorithm (Simulink)

瘦欲@ 提交于 2020-04-17 19:11:49
问题 I am trying to develop an FOC algorithm in Simulink (see image attached) but I am having extrange results in my simulation. My torque is not constant, when it should, but varying periodically (see image attached), when it should be constant at 2 Nm. Also the scope for my q-axis current my probe is giving me a strange graph (see image attached) I can't even make sense of. Please if anyone could help me I would really appreciate it since I have no clue what is going on. I don't know if it could

Error using eval in matlabcontrol

让人想犯罪 __ 提交于 2020-03-26 06:50:13
问题 I used MatlabConrol to connect Java and MATLAB. I want to send an image path to MATLAB to process it with matching functions and give me back a number of similar images and paths, to show in the Java GUI. I always get the same error when passing an image path to MATLAB: Error using eval Undefined function 'getinput' for input arguments of type 'char'. Here's my MATLAB function: function matlab = getinput(input) results = hgr(input); And my Java code: imag = ImageIO.read(fileChoose

Passing a .NET Datatable to MATLAB

耗尽温柔 提交于 2020-01-23 17:30:10
问题 I'm building an interface layer for a Matlab component which is used to analyse data maintained by a separate .NET application which I am also building. I'm trying to serialise a .NET datatable as a numeric array to be passed to the MATLAB component (as part of a more generalised serialisation routine). So far, I've been reasonably successful with passing tables of numeric data but I've hit a snag when trying to add a column of datatype DateTime . What I've been doing up to now is stuffing

How to access variables saved in .mat file in a built jar file by MATLAB Builder JA?

这一生的挚爱 提交于 2020-01-05 13:37:10
问题 I have been so distracted by the whole amount of pages documenting MATLAB Builder JA and running very low on time. My question is, how could I load a .mat file and access all variables of it? What I did is, I made my own class with all functions I need in MATLAB Builder JA, then added the .mat file I need and built all that. I made a java project now and instantiated an object of my class but now I want to access the variables saved in the .mat file in Java to pass it to the object's methods?

Deploytool for MATLAB R2013b doesn't work, what has changed?

强颜欢笑 提交于 2020-01-03 10:07:20
问题 For years I've been using the integrated deploytool to create easily distributable *.exe files for my colleagues. I installed R2013b a couple of days ago and I can't use the deploytool anymore. The log file when trying to package gives this: ant: <ant> <mkdir dir="C:\Users\xxxx\Matlab\programxy\test\for_redistribution" /> <mkdir dir="C:\Users\xxxx\Matlab\programxy\test\for_testing" /> </ant> mcc -C -o test -W WinMain:test -T link:exe -d 'C:\Users\xxxx\Matlab\programxy\test\for_testing' -v 'C:

How to use “global static” variable in matlab function called in c

不打扰是莪最后的温柔 提交于 2020-01-02 04:41:10
问题 Hi I'm currently coding in MATLAB and C. I have compiled MATLAB functions into a C shared library using MATLAB Compiler (mcc), and called the functions in the shared library in a C++ program. Can a global variable be declared to share data between MATLAB functions when called in C++? To be exact, if there is a function matlabA() and function matlabB() in matlab, and is compiled into c++ shared library using mcc compiler as cppA() and cppB() , can I share a variable between them just by

Compiling C++11 code as part of a MATLAB mex file

℡╲_俬逩灬. 提交于 2020-01-01 05:15:09
问题 I have a piece of code written in C++11, which I want to compile as part of a MATLAB MEX file for GNU/Linux. The problem is that MATLAB on Linux supports GCC 4.3 (and earlier) only, and does not support GCC 4.7 which is required to compile my C++11 code. Is it possible to work-around the problem? Would it be possible to work-around this by compiling some object files using GCC 4.7 and link them into the MEX file using GCC 4.3? Thanks in advance! 回答1: If you can write any code in your 4.3

matlab neural network toolbox

走远了吗. 提交于 2019-12-29 08:24:08
问题 I used the matlab neural network to train on some data but I want to run this neural network in c++ program,how to do that? 回答1: You can use ML to generate your feature set (input layer) and then use an open source C++ NN implementation to do training/classification. (E.g., http://takinginitiative.net/2008/04/23/basic-neural-network-tutorial-c-implementation-and-source-code/) If you want to use ML to train and C++ to classify it shouldn't be too difficult to write some additional code to