Tag Archives: matlab
I have one specific line of code that I can’t type in or edit whatsoever and I need to because I’m being graded on it by Matlab grader for a class.
I can’t edit this line of code no matter what I do to the extent that when I click on it instead of my cursor blinking being ready to type it remains solid. I can’t even hit the enter key in the line.I can’t edit this line of code no matter what I do to the extent that when I click on it instead of my cursor blinking being ready to type it remains solid. I can’t even hit the enter key in the line. I can’t edit this line of code no matter what I do to the extent that when I click on it instead of my cursor blinking being ready to type it remains solid. I can’t even hit the enter key in the line. can’t type, technical problems, solid cursor, code, livescript MATLAB Answers — New Questions
I want to define inputs for the function quantized_signal
Looking at this function:
function quantized_signal = nonlinear_quantize(signal, bits, method, param)
end
How do I define signal, bits, method and param?Looking at this function:
function quantized_signal = nonlinear_quantize(signal, bits, method, param)
end
How do I define signal, bits, method and param? Looking at this function:
function quantized_signal = nonlinear_quantize(signal, bits, method, param)
end
How do I define signal, bits, method and param? nonlinear_quantize MATLAB Answers — New Questions
power systems onramp issue
Hi, web power system onramp the task2 of 2/3 (three phase domain) is asking for 120V for the source rms line to line and 10ohm for the R load,
Even after following the hints and seeing the solution and applying it literally, the result is always "incorrect’ as the output voltage is not matching the plotted one,
appreciate a guidance,
regards.Hi, web power system onramp the task2 of 2/3 (three phase domain) is asking for 120V for the source rms line to line and 10ohm for the R load,
Even after following the hints and seeing the solution and applying it literally, the result is always "incorrect’ as the output voltage is not matching the plotted one,
appreciate a guidance,
regards. Hi, web power system onramp the task2 of 2/3 (three phase domain) is asking for 120V for the source rms line to line and 10ohm for the R load,
Even after following the hints and seeing the solution and applying it literally, the result is always "incorrect’ as the output voltage is not matching the plotted one,
appreciate a guidance,
regards. onramp power system MATLAB Answers — New Questions
Type-4 Wind Generator Model
I am looking for a model of a Type-4 Wind Generator Model, more specifically a 2 MW example. The closest example I have found is "Wind Farm – Synchronous Generator and Full-Scale Converter (Type 4) Detailed Model". I was wondering if there was every a single Type-4 Wind Generator Model as this is for an important project in which the project supervisor has referred to a single 2 MW example. The opjective of this project is to upscale the model to a more modern 10-15 MW model.I am looking for a model of a Type-4 Wind Generator Model, more specifically a 2 MW example. The closest example I have found is "Wind Farm – Synchronous Generator and Full-Scale Converter (Type 4) Detailed Model". I was wondering if there was every a single Type-4 Wind Generator Model as this is for an important project in which the project supervisor has referred to a single 2 MW example. The opjective of this project is to upscale the model to a more modern 10-15 MW model. I am looking for a model of a Type-4 Wind Generator Model, more specifically a 2 MW example. The closest example I have found is "Wind Farm – Synchronous Generator and Full-Scale Converter (Type 4) Detailed Model". I was wondering if there was every a single Type-4 Wind Generator Model as this is for an important project in which the project supervisor has referred to a single 2 MW example. The opjective of this project is to upscale the model to a more modern 10-15 MW model. wind turbine, simscape MATLAB Answers — New Questions
Visibility flag on Keypoint Detector Object
Hello everyone,
I was wondering if anyone could help me understanding how to set up the training data for KeyPoint Detector Object (trainHRNETObjectKeypointDetector).
The help says:
"Keypoint locations, defined in spatial coordinates as an N-by-2 or N-by-3 numeric matrix with rows of the form [x y] or [x y v], respectively, where:
N is the number of keypoint classes.
x and y specify the spatial coordinates of a keypoint.
v specifies the visibility of a keypoint."
I was wondering how to setup the visibility flag v .
Is it 1 when the key point is visible and annotated and 0 when it is not. Or same as Yolo 0 = key point out of view and not labelled; 1 = key point present but not visible; 2 = key point visible ?
Thank you very much for your helpHello everyone,
I was wondering if anyone could help me understanding how to set up the training data for KeyPoint Detector Object (trainHRNETObjectKeypointDetector).
The help says:
"Keypoint locations, defined in spatial coordinates as an N-by-2 or N-by-3 numeric matrix with rows of the form [x y] or [x y v], respectively, where:
N is the number of keypoint classes.
x and y specify the spatial coordinates of a keypoint.
v specifies the visibility of a keypoint."
I was wondering how to setup the visibility flag v .
Is it 1 when the key point is visible and annotated and 0 when it is not. Or same as Yolo 0 = key point out of view and not labelled; 1 = key point present but not visible; 2 = key point visible ?
Thank you very much for your help Hello everyone,
I was wondering if anyone could help me understanding how to set up the training data for KeyPoint Detector Object (trainHRNETObjectKeypointDetector).
The help says:
"Keypoint locations, defined in spatial coordinates as an N-by-2 or N-by-3 numeric matrix with rows of the form [x y] or [x y v], respectively, where:
N is the number of keypoint classes.
x and y specify the spatial coordinates of a keypoint.
v specifies the visibility of a keypoint."
I was wondering how to setup the visibility flag v .
Is it 1 when the key point is visible and annotated and 0 when it is not. Or same as Yolo 0 = key point out of view and not labelled; 1 = key point present but not visible; 2 = key point visible ?
Thank you very much for your help deep learning, keypoint detector MATLAB Answers — New Questions
How to get ESP32 as an option for board when setting up hardware setup
Hi i am follow this link to connect ESP32 to matlab
https://au.mathworks.com/help/supportpkg/arduinoio/ug/configure-setup-for-esp32-hardware.html (MATLAB Support Package for Arduino Hardware)
However when I follow instructions i do not get the options of ESP32. How do i make it so that i can?Hi i am follow this link to connect ESP32 to matlab
https://au.mathworks.com/help/supportpkg/arduinoio/ug/configure-setup-for-esp32-hardware.html (MATLAB Support Package for Arduino Hardware)
However when I follow instructions i do not get the options of ESP32. How do i make it so that i can? Hi i am follow this link to connect ESP32 to matlab
https://au.mathworks.com/help/supportpkg/arduinoio/ug/configure-setup-for-esp32-hardware.html (MATLAB Support Package for Arduino Hardware)
However when I follow instructions i do not get the options of ESP32. How do i make it so that i can? eps32, hardware setup, matlab MATLAB Answers — New Questions
Simulink error: input index exceeds signal width in Park Transform block of PMSM FOC model
I am simulating a PMSM drive using Field-Oriented Control in Simulink.
The model uses Clarke and Park transforms to generate Id and Iq currents.
When I run the simulation, I get the following error:
"An input index exceeds its input width of 2"
The error points to the Park Transform block inside the PMSM controller.
I am feeding abc phase currents into the Clarke Transform and then into the Park Transform.
However, I am not sure whether the signal dimensions are correct or if I am missing a signal connection.
I have verified that:
– The abc signals are three-phase
– The electrical angle is connected
– No manual indexing is used
What is the correct signal dimension and connection for the Park Transform in a PMSM FOC model?I am simulating a PMSM drive using Field-Oriented Control in Simulink.
The model uses Clarke and Park transforms to generate Id and Iq currents.
When I run the simulation, I get the following error:
"An input index exceeds its input width of 2"
The error points to the Park Transform block inside the PMSM controller.
I am feeding abc phase currents into the Clarke Transform and then into the Park Transform.
However, I am not sure whether the signal dimensions are correct or if I am missing a signal connection.
I have verified that:
– The abc signals are three-phase
– The electrical angle is connected
– No manual indexing is used
What is the correct signal dimension and connection for the Park Transform in a PMSM FOC model? I am simulating a PMSM drive using Field-Oriented Control in Simulink.
The model uses Clarke and Park transforms to generate Id and Iq currents.
When I run the simulation, I get the following error:
"An input index exceeds its input width of 2"
The error points to the Park Transform block inside the PMSM controller.
I am feeding abc phase currents into the Clarke Transform and then into the Park Transform.
However, I am not sure whether the signal dimensions are correct or if I am missing a signal connection.
I have verified that:
– The abc signals are three-phase
– The electrical angle is connected
– No manual indexing is used
What is the correct signal dimension and connection for the Park Transform in a PMSM FOC model? simulink, pmsm, field-oriented-control, park-trans MATLAB Answers — New Questions
Printing values to the command window
how does one print a value of a variable to the command window?how does one print a value of a variable to the command window? how does one print a value of a variable to the command window? command window, print value MATLAB Answers — New Questions
How do I force Simulink app setting during startup to impact the target instead of just the GUI?
Simple simulink model converted to app via App Generator & App Designer.
Trying to load last values (from a .mat file) for a given item via callback on Start Button (app.StartStopButton), PreStartFcn.
I check if the file is available, load, then set app value (code below). This results in the GUI correctly displaying the value, however, the underlying component/value (referred to hereafter as the "model value") that the GUI is connected to doesn’t reflect the state of the GUI and is set to the underlying constant value defined in the model. Confirmed model value not loaded during startup via saving state of model value to file via File Log blocks and observing state via SDI. Can also verify value via calculation value is used for that is displayed on the GUI.
The GUI is definitely connected to the model value as when the GUI is updated by the user (after the Start button is pressed), the model value syncs to the GUI state… it is just this initial load that will only update the GUI.
function StartStopButtonPreStart(app, event) % Callback called on Start (pre or post, doesn’t matter).
if isfile(‘DST.mat’)
loadedData = load(‘DST.mat’);
app.DST_Enabled_Value.Value = loadedData.value; % This updates the GUI, but not underlying model value.
end
end
% generic code created by default when utilizing app generator & app
% designer
function startupFcn(app)
% … other setup …
hInst = slrealtime.Instrument();
DST_Enabled_Value_values = [0 1];
DST_Enabled_Value_labels = [0 1];
targetSelector = app.TargetSelector;
slrtcomp = slrealtime.ui.tool.ParameterTuner(app.UIFigure, ‘TargetSource’, targetSelector);
slrtcomp.Component = app.DST_Enabled_Value;
slrtcomp.BlockPath = ‘DST_TimeZone_Test/Subsystem Reference/DST_Enabled’;
slrtcomp.ParameterName = ‘Value’;
slrtcomp.ConvertToComponent = @(val)app.convertValueToValue(val, DST_Enabled_Value_values, DST_Enabled_Value_labels);
slrtcomp.ConvertToTarget = @(val)app.convertValueToValue(val, DST_Enabled_Value_labels, DST_Enabled_Value_values);
slrtInstrumentsComponent = slrealtime.ui.tool.InstrumentManager(app.UIFigure, ‘TargetSource’, targetSelector);
slrtInstrumentsComponent.Instruments = hInst;
% … other setup …
endSimple simulink model converted to app via App Generator & App Designer.
Trying to load last values (from a .mat file) for a given item via callback on Start Button (app.StartStopButton), PreStartFcn.
I check if the file is available, load, then set app value (code below). This results in the GUI correctly displaying the value, however, the underlying component/value (referred to hereafter as the "model value") that the GUI is connected to doesn’t reflect the state of the GUI and is set to the underlying constant value defined in the model. Confirmed model value not loaded during startup via saving state of model value to file via File Log blocks and observing state via SDI. Can also verify value via calculation value is used for that is displayed on the GUI.
The GUI is definitely connected to the model value as when the GUI is updated by the user (after the Start button is pressed), the model value syncs to the GUI state… it is just this initial load that will only update the GUI.
function StartStopButtonPreStart(app, event) % Callback called on Start (pre or post, doesn’t matter).
if isfile(‘DST.mat’)
loadedData = load(‘DST.mat’);
app.DST_Enabled_Value.Value = loadedData.value; % This updates the GUI, but not underlying model value.
end
end
% generic code created by default when utilizing app generator & app
% designer
function startupFcn(app)
% … other setup …
hInst = slrealtime.Instrument();
DST_Enabled_Value_values = [0 1];
DST_Enabled_Value_labels = [0 1];
targetSelector = app.TargetSelector;
slrtcomp = slrealtime.ui.tool.ParameterTuner(app.UIFigure, ‘TargetSource’, targetSelector);
slrtcomp.Component = app.DST_Enabled_Value;
slrtcomp.BlockPath = ‘DST_TimeZone_Test/Subsystem Reference/DST_Enabled’;
slrtcomp.ParameterName = ‘Value’;
slrtcomp.ConvertToComponent = @(val)app.convertValueToValue(val, DST_Enabled_Value_values, DST_Enabled_Value_labels);
slrtcomp.ConvertToTarget = @(val)app.convertValueToValue(val, DST_Enabled_Value_labels, DST_Enabled_Value_values);
slrtInstrumentsComponent = slrealtime.ui.tool.InstrumentManager(app.UIFigure, ‘TargetSource’, targetSelector);
slrtInstrumentsComponent.Instruments = hInst;
% … other setup …
end Simple simulink model converted to app via App Generator & App Designer.
Trying to load last values (from a .mat file) for a given item via callback on Start Button (app.StartStopButton), PreStartFcn.
I check if the file is available, load, then set app value (code below). This results in the GUI correctly displaying the value, however, the underlying component/value (referred to hereafter as the "model value") that the GUI is connected to doesn’t reflect the state of the GUI and is set to the underlying constant value defined in the model. Confirmed model value not loaded during startup via saving state of model value to file via File Log blocks and observing state via SDI. Can also verify value via calculation value is used for that is displayed on the GUI.
The GUI is definitely connected to the model value as when the GUI is updated by the user (after the Start button is pressed), the model value syncs to the GUI state… it is just this initial load that will only update the GUI.
function StartStopButtonPreStart(app, event) % Callback called on Start (pre or post, doesn’t matter).
if isfile(‘DST.mat’)
loadedData = load(‘DST.mat’);
app.DST_Enabled_Value.Value = loadedData.value; % This updates the GUI, but not underlying model value.
end
end
% generic code created by default when utilizing app generator & app
% designer
function startupFcn(app)
% … other setup …
hInst = slrealtime.Instrument();
DST_Enabled_Value_values = [0 1];
DST_Enabled_Value_labels = [0 1];
targetSelector = app.TargetSelector;
slrtcomp = slrealtime.ui.tool.ParameterTuner(app.UIFigure, ‘TargetSource’, targetSelector);
slrtcomp.Component = app.DST_Enabled_Value;
slrtcomp.BlockPath = ‘DST_TimeZone_Test/Subsystem Reference/DST_Enabled’;
slrtcomp.ParameterName = ‘Value’;
slrtcomp.ConvertToComponent = @(val)app.convertValueToValue(val, DST_Enabled_Value_values, DST_Enabled_Value_labels);
slrtcomp.ConvertToTarget = @(val)app.convertValueToValue(val, DST_Enabled_Value_labels, DST_Enabled_Value_values);
slrtInstrumentsComponent = slrealtime.ui.tool.InstrumentManager(app.UIFigure, ‘TargetSource’, targetSelector);
slrtInstrumentsComponent.Instruments = hInst;
% … other setup …
end simulink, startup loading, gui but not target MATLAB Answers — New Questions
Interact with the Test Browser GUI programatically?
I have a matlab project that contains a folder for of test classes at
test_path = "<project_root>/tests/"
This file is automatically added to the project search path by a startup script. I like the Test Browser panel in the GUI, however I find that each session I have to manually add my tests to the browser by clicking the "plus" icon and selecting my test path in the selection window.
Is there a way to modify my project settings or the startup script to automatically populate the Test Browser panel with my tests?
Thanks for the responses. Please note that I am NOT asking how to run tests or create test suites programatically here – I know how to do that using the testsuite and run- I’m specifically intersted in making the Test Browser panel populate automatically with my tests.I have a matlab project that contains a folder for of test classes at
test_path = "<project_root>/tests/"
This file is automatically added to the project search path by a startup script. I like the Test Browser panel in the GUI, however I find that each session I have to manually add my tests to the browser by clicking the "plus" icon and selecting my test path in the selection window.
Is there a way to modify my project settings or the startup script to automatically populate the Test Browser panel with my tests?
Thanks for the responses. Please note that I am NOT asking how to run tests or create test suites programatically here – I know how to do that using the testsuite and run- I’m specifically intersted in making the Test Browser panel populate automatically with my tests. I have a matlab project that contains a folder for of test classes at
test_path = "<project_root>/tests/"
This file is automatically added to the project search path by a startup script. I like the Test Browser panel in the GUI, however I find that each session I have to manually add my tests to the browser by clicking the "plus" icon and selecting my test path in the selection window.
Is there a way to modify my project settings or the startup script to automatically populate the Test Browser panel with my tests?
Thanks for the responses. Please note that I am NOT asking how to run tests or create test suites programatically here – I know how to do that using the testsuite and run- I’m specifically intersted in making the Test Browser panel populate automatically with my tests. test browser, tests, test MATLAB Answers — New Questions
copygraphics has extra padding when copying with “ContentType” as “vector”.
Hi,
I am using copy graphics to copy my figures. I am running into a problem though.
figure;
plot(randn(5,1));
copygraphics(gcf, "ContentType","vector")
Will copy a plot that looks like this when pasted into microsoft Word:
Notice the extra padding at the bottom and on the right.
If I do the same code but with the image content type:
figure;
plot(randn(5,1));
copygraphics(gcf, "ContentType","image")
Then the resulting pasted image has no padding:
Note: the "Padding" option works, but when I add a "Padding" of 60 then I still have more padding on the right and bottom of the image.
I tried pasting it into another program, Inkscape, and it didn’t have the padding error. So it must be something to do with microsoft Word (and OneNote as well). I also can copy the axes from the toolstrip and it has the same padding error.
This error only occurs in Matlab 2025b. I also tried it in Matlab 2022a and that error is gone. So it must be something with the newer versions of matlab and it is something that matlab workers could fix.
If anyone has any idea what is going on that would be great.Hi,
I am using copy graphics to copy my figures. I am running into a problem though.
figure;
plot(randn(5,1));
copygraphics(gcf, "ContentType","vector")
Will copy a plot that looks like this when pasted into microsoft Word:
Notice the extra padding at the bottom and on the right.
If I do the same code but with the image content type:
figure;
plot(randn(5,1));
copygraphics(gcf, "ContentType","image")
Then the resulting pasted image has no padding:
Note: the "Padding" option works, but when I add a "Padding" of 60 then I still have more padding on the right and bottom of the image.
I tried pasting it into another program, Inkscape, and it didn’t have the padding error. So it must be something to do with microsoft Word (and OneNote as well). I also can copy the axes from the toolstrip and it has the same padding error.
This error only occurs in Matlab 2025b. I also tried it in Matlab 2022a and that error is gone. So it must be something with the newer versions of matlab and it is something that matlab workers could fix.
If anyone has any idea what is going on that would be great. Hi,
I am using copy graphics to copy my figures. I am running into a problem though.
figure;
plot(randn(5,1));
copygraphics(gcf, "ContentType","vector")
Will copy a plot that looks like this when pasted into microsoft Word:
Notice the extra padding at the bottom and on the right.
If I do the same code but with the image content type:
figure;
plot(randn(5,1));
copygraphics(gcf, "ContentType","image")
Then the resulting pasted image has no padding:
Note: the "Padding" option works, but when I add a "Padding" of 60 then I still have more padding on the right and bottom of the image.
I tried pasting it into another program, Inkscape, and it didn’t have the padding error. So it must be something to do with microsoft Word (and OneNote as well). I also can copy the axes from the toolstrip and it has the same padding error.
This error only occurs in Matlab 2025b. I also tried it in Matlab 2022a and that error is gone. So it must be something with the newer versions of matlab and it is something that matlab workers could fix.
If anyone has any idea what is going on that would be great. copygraphics, export MATLAB Answers — New Questions
How does the Positive-Displacement Compressor (2P) compute the fluid power?
What is the energy balance equation of the Positive-Displacement Compressor (2P) block to calculate the fluid power? The documentation says the fluid power is equal to Wc_dot in the polytropic case, yet the Wc_dot does not equal to the energy flow or the enthalpy change of the refrigerant through the block. Wc_dot actually equals to mechanical power * mechanical efficiency based on my calculation using a test model. And the fluid power is equal to the enthapy change of the refrigerant in my test model, which corresponds to the isentropic thermodynamics model in the document. However, I am using the polytropic thermodynamics model in my test model.What is the energy balance equation of the Positive-Displacement Compressor (2P) block to calculate the fluid power? The documentation says the fluid power is equal to Wc_dot in the polytropic case, yet the Wc_dot does not equal to the energy flow or the enthalpy change of the refrigerant through the block. Wc_dot actually equals to mechanical power * mechanical efficiency based on my calculation using a test model. And the fluid power is equal to the enthapy change of the refrigerant in my test model, which corresponds to the isentropic thermodynamics model in the document. However, I am using the polytropic thermodynamics model in my test model. What is the energy balance equation of the Positive-Displacement Compressor (2P) block to calculate the fluid power? The documentation says the fluid power is equal to Wc_dot in the polytropic case, yet the Wc_dot does not equal to the energy flow or the enthalpy change of the refrigerant through the block. Wc_dot actually equals to mechanical power * mechanical efficiency based on my calculation using a test model. And the fluid power is equal to the enthapy change of the refrigerant in my test model, which corresponds to the isentropic thermodynamics model in the document. However, I am using the polytropic thermodynamics model in my test model. simscape, simulink MATLAB Answers — New Questions
Matlab workers in Parloop are not using the path order
Hello, I’m using this code
parfor k=1:10
[..]=pca(..)
end
I have 2 definitions of pca (the matlab package and another package). I’ve set the search path to use the matlab package by default, but inside the parloop the other function is used instead. I didn’t found a way to arrange this without removing the other package.
ThanksHello, I’m using this code
parfor k=1:10
[..]=pca(..)
end
I have 2 definitions of pca (the matlab package and another package). I’ve set the search path to use the matlab package by default, but inside the parloop the other function is used instead. I didn’t found a way to arrange this without removing the other package.
Thanks Hello, I’m using this code
parfor k=1:10
[..]=pca(..)
end
I have 2 definitions of pca (the matlab package and another package). I’ve set the search path to use the matlab package by default, but inside the parloop the other function is used instead. I didn’t found a way to arrange this without removing the other package.
Thanks parfor, path MATLAB Answers — New Questions
How to install ‘FMU Builder’ in Docker Container?
Hello, I’m trying to export FMU from the Simulink Model in Docker Container.
I actually did it without any problem until I used R2022b Matlab/Simulink, but when I tried with R2024b I got an error:
"FMU export requires FMU Builder for Simulink Support Package"
And I realized I need additional Add-on (FMU Builder) from R2023b Matlab/Simulink.
Installing ‘FMU Builder’ can be easily done in MS Windows (using Add-on Explorer), but it’s totally different story for Docker Container environment.
I want to build a Docker Image which supports FMU creation under the conditions below:
(Of course) I have ‘Simulink Compiler’ license.
I want to build a Docker Image from the scratch (Using ubi Image, Not using the Image provided by Mathworks, because I have some dependencies to be installed)
I want to use Matlab/Simulink installation file (*.iso) downloaded from Mathworks website (Not using MPM, because of the network constraints)
I wonder how to install ‘FMU Builder’ satisfying all the conditions above,
becuase the only way I found until now, is to install Matlab/Simulink with MPM when I build a Docker Image.
But this is against one of the conditions.
I also found the help page:
https://www.mathworks.com/help/matlab/ref/matlab.addons.install.html
This help doc explains how to install Add-on using .mltbx file format,
but when I download FMU Builder:
https://www.mathworks.com/products/fmubuilder.html
I only got ‘fmubuilder.mlpkginstall’, not .mltbx file, and I have no idea where to get .mltbx file for FMU Builder.
Anyone can help about this issue?
Thank you!Hello, I’m trying to export FMU from the Simulink Model in Docker Container.
I actually did it without any problem until I used R2022b Matlab/Simulink, but when I tried with R2024b I got an error:
"FMU export requires FMU Builder for Simulink Support Package"
And I realized I need additional Add-on (FMU Builder) from R2023b Matlab/Simulink.
Installing ‘FMU Builder’ can be easily done in MS Windows (using Add-on Explorer), but it’s totally different story for Docker Container environment.
I want to build a Docker Image which supports FMU creation under the conditions below:
(Of course) I have ‘Simulink Compiler’ license.
I want to build a Docker Image from the scratch (Using ubi Image, Not using the Image provided by Mathworks, because I have some dependencies to be installed)
I want to use Matlab/Simulink installation file (*.iso) downloaded from Mathworks website (Not using MPM, because of the network constraints)
I wonder how to install ‘FMU Builder’ satisfying all the conditions above,
becuase the only way I found until now, is to install Matlab/Simulink with MPM when I build a Docker Image.
But this is against one of the conditions.
I also found the help page:
https://www.mathworks.com/help/matlab/ref/matlab.addons.install.html
This help doc explains how to install Add-on using .mltbx file format,
but when I download FMU Builder:
https://www.mathworks.com/products/fmubuilder.html
I only got ‘fmubuilder.mlpkginstall’, not .mltbx file, and I have no idea where to get .mltbx file for FMU Builder.
Anyone can help about this issue?
Thank you! Hello, I’m trying to export FMU from the Simulink Model in Docker Container.
I actually did it without any problem until I used R2022b Matlab/Simulink, but when I tried with R2024b I got an error:
"FMU export requires FMU Builder for Simulink Support Package"
And I realized I need additional Add-on (FMU Builder) from R2023b Matlab/Simulink.
Installing ‘FMU Builder’ can be easily done in MS Windows (using Add-on Explorer), but it’s totally different story for Docker Container environment.
I want to build a Docker Image which supports FMU creation under the conditions below:
(Of course) I have ‘Simulink Compiler’ license.
I want to build a Docker Image from the scratch (Using ubi Image, Not using the Image provided by Mathworks, because I have some dependencies to be installed)
I want to use Matlab/Simulink installation file (*.iso) downloaded from Mathworks website (Not using MPM, because of the network constraints)
I wonder how to install ‘FMU Builder’ satisfying all the conditions above,
becuase the only way I found until now, is to install Matlab/Simulink with MPM when I build a Docker Image.
But this is against one of the conditions.
I also found the help page:
https://www.mathworks.com/help/matlab/ref/matlab.addons.install.html
This help doc explains how to install Add-on using .mltbx file format,
but when I download FMU Builder:
https://www.mathworks.com/products/fmubuilder.html
I only got ‘fmubuilder.mlpkginstall’, not .mltbx file, and I have no idea where to get .mltbx file for FMU Builder.
Anyone can help about this issue?
Thank you! docker, add-on, installation MATLAB Answers — New Questions
Is MATLAB supported on Windows on ARM devices?
Windows devices using ARM hardware, such as the Snapdragon X Elite, have two ways to run applications. Applications built for Windows on ARM run natively, while apps built for x86-64 processors run in the Prism emulator. Is MATLAB supported on Windows ARM devices?Windows devices using ARM hardware, such as the Snapdragon X Elite, have two ways to run applications. Applications built for Windows on ARM run natively, while apps built for x86-64 processors run in the Prism emulator. Is MATLAB supported on Windows ARM devices? Windows devices using ARM hardware, such as the Snapdragon X Elite, have two ways to run applications. Applications built for Windows on ARM run natively, while apps built for x86-64 processors run in the Prism emulator. Is MATLAB supported on Windows ARM devices? MATLAB Answers — New Questions
How to build a mechanical arm dynamics simulation model
The mechanical arm grabs the object motion to calculate the joint torque.The mechanical arm grabs the object motion to calculate the joint torque. The mechanical arm grabs the object motion to calculate the joint torque. dynamics simulation model MATLAB Answers — New Questions
Need coordinates of endpoints on scatter plot
I have a scatterplot that forms multiple rays and I need to know the coordinates of the points at the ends of each ray.
My code is as follows:
data1 = readtable(‘600psi_15k_FT.txt’);
data2 = readtable(‘1000psi_10k_FT.txt’);
x1=data1.Var1;
y1=data1.Var2;
x2=data2.Var1;
y2=data2.Var2;
[peaks,locs]=findpeaks(y2,MinPeakHeight=0.003,MinPeakProminence=0.0006)
figure;
hold on;
plot(x1, y1, ‘b-‘, ‘DisplayName’, ‘600psi’);
plot(x2, y2, ‘r-‘, ‘DisplayName’, ‘1000psi’);
plot(x2(locs), peaks, ‘ro’, ‘MarkerFaceColor’, ‘r’, ‘DisplayName’, ‘Peaks’);
legend show;
hold off;
other_peaks = y1(locs);
scatter(peaks,other_peaks);
plot(peaks,other_peaks,’-o’)I have a scatterplot that forms multiple rays and I need to know the coordinates of the points at the ends of each ray.
My code is as follows:
data1 = readtable(‘600psi_15k_FT.txt’);
data2 = readtable(‘1000psi_10k_FT.txt’);
x1=data1.Var1;
y1=data1.Var2;
x2=data2.Var1;
y2=data2.Var2;
[peaks,locs]=findpeaks(y2,MinPeakHeight=0.003,MinPeakProminence=0.0006)
figure;
hold on;
plot(x1, y1, ‘b-‘, ‘DisplayName’, ‘600psi’);
plot(x2, y2, ‘r-‘, ‘DisplayName’, ‘1000psi’);
plot(x2(locs), peaks, ‘ro’, ‘MarkerFaceColor’, ‘r’, ‘DisplayName’, ‘Peaks’);
legend show;
hold off;
other_peaks = y1(locs);
scatter(peaks,other_peaks);
plot(peaks,other_peaks,’-o’) I have a scatterplot that forms multiple rays and I need to know the coordinates of the points at the ends of each ray.
My code is as follows:
data1 = readtable(‘600psi_15k_FT.txt’);
data2 = readtable(‘1000psi_10k_FT.txt’);
x1=data1.Var1;
y1=data1.Var2;
x2=data2.Var1;
y2=data2.Var2;
[peaks,locs]=findpeaks(y2,MinPeakHeight=0.003,MinPeakProminence=0.0006)
figure;
hold on;
plot(x1, y1, ‘b-‘, ‘DisplayName’, ‘600psi’);
plot(x2, y2, ‘r-‘, ‘DisplayName’, ‘1000psi’);
plot(x2(locs), peaks, ‘ro’, ‘MarkerFaceColor’, ‘r’, ‘DisplayName’, ‘Peaks’);
legend show;
hold off;
other_peaks = y1(locs);
scatter(peaks,other_peaks);
plot(peaks,other_peaks,’-o’) scatterplot, coordinates MATLAB Answers — New Questions
Does isAlways Make an Unwarranted Assumption that a Variable is real?
Define a sym variable
syms v
isAlways can’t prove that v is real. Makes sense.
isAlways(in(v,’real’))
Now make an assumption
assume(v > 0); % (1)
Is that assumption a sufficient condition to imply that v is real?
isAlways(in(v,’real’)) %(2)
Apparently it does.
But we don’t see that v is real in the assumptions
assumptions(v)
as we would if stated explicitly
assumeAlso(v,’real’);
assumptions(v)
Now define v as a complex number, which clears all of the assumptions
v = sym(1+1i);
assumptions(v)
Here, v satisfies assumption (1) because symbolic gt only compares the real parts of both sides (though the doc page does not state that explicitly)
isAlways(v > 0)
But satisfying assumption (1) in this case does not imply the truth of condition (2) (thankfully)
isAlways(in(v,’real’))
Seems like the correct way for the software to interpret (1) would be Re(v) > 0, in accordance with the de facto definition of gt, which would provide no information for evaluating (2).Define a sym variable
syms v
isAlways can’t prove that v is real. Makes sense.
isAlways(in(v,’real’))
Now make an assumption
assume(v > 0); % (1)
Is that assumption a sufficient condition to imply that v is real?
isAlways(in(v,’real’)) %(2)
Apparently it does.
But we don’t see that v is real in the assumptions
assumptions(v)
as we would if stated explicitly
assumeAlso(v,’real’);
assumptions(v)
Now define v as a complex number, which clears all of the assumptions
v = sym(1+1i);
assumptions(v)
Here, v satisfies assumption (1) because symbolic gt only compares the real parts of both sides (though the doc page does not state that explicitly)
isAlways(v > 0)
But satisfying assumption (1) in this case does not imply the truth of condition (2) (thankfully)
isAlways(in(v,’real’))
Seems like the correct way for the software to interpret (1) would be Re(v) > 0, in accordance with the de facto definition of gt, which would provide no information for evaluating (2). Define a sym variable
syms v
isAlways can’t prove that v is real. Makes sense.
isAlways(in(v,’real’))
Now make an assumption
assume(v > 0); % (1)
Is that assumption a sufficient condition to imply that v is real?
isAlways(in(v,’real’)) %(2)
Apparently it does.
But we don’t see that v is real in the assumptions
assumptions(v)
as we would if stated explicitly
assumeAlso(v,’real’);
assumptions(v)
Now define v as a complex number, which clears all of the assumptions
v = sym(1+1i);
assumptions(v)
Here, v satisfies assumption (1) because symbolic gt only compares the real parts of both sides (though the doc page does not state that explicitly)
isAlways(v > 0)
But satisfying assumption (1) in this case does not imply the truth of condition (2) (thankfully)
isAlways(in(v,’real’))
Seems like the correct way for the software to interpret (1) would be Re(v) > 0, in accordance with the de facto definition of gt, which would provide no information for evaluating (2). assumption, isalways MATLAB Answers — New Questions
Strange behavior of “isAlways” with respect to the number of symbolic variables
Dear all,
I am trying some tests with "isAlways" in order to check that a rater long algebraic expression is always positive, assuming that all its variables are positive.
One of the tests is the following
syms a b c d e f g real
assume(a >=0 & b>=0 & c>=0 & d>=0 & e>=0 & f>=0 & g>=0)
assumeAlso(a + b + c + d + e + f + g <=1)
isAlways(a+b<=1)
ans =
logical
1
which correctly says that if a,b,c,d,e,f,g are real and positive numbers with their sum less or equal to 1, then also the sum of the first two is less or equal to 1.
But when I try the same test with one additional variable, then
syms a b c d e f g m real
assume(a >=0 & b>=0 & c>=0 & d>=0 & e>=0 & f>=0 & g>=0 & m>=0)
assumeAlso(a + b + c + d + e + f + g +m <=1)
isAlways(a+b<=1)
Warning: Unable to prove ‘a + b <= 1’.
> In mupadengine/evalin2logical
In mupadengine/feval2logical
In sym/isAlways (line 39)
ans =
logical
0
How is this possible?Dear all,
I am trying some tests with "isAlways" in order to check that a rater long algebraic expression is always positive, assuming that all its variables are positive.
One of the tests is the following
syms a b c d e f g real
assume(a >=0 & b>=0 & c>=0 & d>=0 & e>=0 & f>=0 & g>=0)
assumeAlso(a + b + c + d + e + f + g <=1)
isAlways(a+b<=1)
ans =
logical
1
which correctly says that if a,b,c,d,e,f,g are real and positive numbers with their sum less or equal to 1, then also the sum of the first two is less or equal to 1.
But when I try the same test with one additional variable, then
syms a b c d e f g m real
assume(a >=0 & b>=0 & c>=0 & d>=0 & e>=0 & f>=0 & g>=0 & m>=0)
assumeAlso(a + b + c + d + e + f + g +m <=1)
isAlways(a+b<=1)
Warning: Unable to prove ‘a + b <= 1’.
> In mupadengine/evalin2logical
In mupadengine/feval2logical
In sym/isAlways (line 39)
ans =
logical
0
How is this possible? Dear all,
I am trying some tests with "isAlways" in order to check that a rater long algebraic expression is always positive, assuming that all its variables are positive.
One of the tests is the following
syms a b c d e f g real
assume(a >=0 & b>=0 & c>=0 & d>=0 & e>=0 & f>=0 & g>=0)
assumeAlso(a + b + c + d + e + f + g <=1)
isAlways(a+b<=1)
ans =
logical
1
which correctly says that if a,b,c,d,e,f,g are real and positive numbers with their sum less or equal to 1, then also the sum of the first two is less or equal to 1.
But when I try the same test with one additional variable, then
syms a b c d e f g m real
assume(a >=0 & b>=0 & c>=0 & d>=0 & e>=0 & f>=0 & g>=0 & m>=0)
assumeAlso(a + b + c + d + e + f + g +m <=1)
isAlways(a+b<=1)
Warning: Unable to prove ‘a + b <= 1’.
> In mupadengine/evalin2logical
In mupadengine/feval2logical
In sym/isAlways (line 39)
ans =
logical
0
How is this possible? isalways, positivity, assume, assumealso MATLAB Answers — New Questions
What are redundant servers, how do I generate a license file for one, and how do I set it up?
I would like to know what redundant servers are, and how to generate and install a redundant server license file for MATLAB and associated products.I would like to know what redundant servers are, and how to generate and install a redundant server license file for MATLAB and associated products. I would like to know what redundant servers are, and how to generate and install a redundant server license file for MATLAB and associated products. MATLAB Answers — New Questions









