Tag Archives: matlab
How to fix it standalone application problem error during packaging in matlab R2014a please any have correct solution for such error
When I type command in command prompt is Error using mcc
Test checkout of feature ‘Compiler’ failed and when I convert .m file to standalone application it’s showing error and open and file log with showing error this oneWhen I type command in command prompt is Error using mcc
Test checkout of feature ‘Compiler’ failed and when I convert .m file to standalone application it’s showing error and open and file log with showing error this one When I type command in command prompt is Error using mcc
Test checkout of feature ‘Compiler’ failed and when I convert .m file to standalone application it’s showing error and open and file log with showing error this one please give me correct solution MATLAB Answers — New Questions
how to write file in PS using simulink
We are using a ZCU111 board and matlab/simulink to implement RFSoC logics. We are developing using the example on the Matlab website ( https://www.mathworks.com/help/soc/ug/ReceiveSignalWaveformUsingDDR4onXilinxRFSoCDevice.html ). There are PL and PS/processor in RFSoC. We want to create/generate data in PL and save data in PS.
Currently, a file has been created in PS. It is not the data we want, but it is writing something. However, after rebooting, it can no longer write data. Also, it is currently writing data to only one file, but we want to manage data events for multiple files. We are saving data in a set of FIFOs and are able to read it out to the computer, but we want to save this data as incrementally named files (event1, event2, etc.) on the PS system instead.
In other words, there are two questions.
Q1. How can we generate files per event in PS/processor?
Q2. How do we keep writing data to files even after a reboot in PS/processor?We are using a ZCU111 board and matlab/simulink to implement RFSoC logics. We are developing using the example on the Matlab website ( https://www.mathworks.com/help/soc/ug/ReceiveSignalWaveformUsingDDR4onXilinxRFSoCDevice.html ). There are PL and PS/processor in RFSoC. We want to create/generate data in PL and save data in PS.
Currently, a file has been created in PS. It is not the data we want, but it is writing something. However, after rebooting, it can no longer write data. Also, it is currently writing data to only one file, but we want to manage data events for multiple files. We are saving data in a set of FIFOs and are able to read it out to the computer, but we want to save this data as incrementally named files (event1, event2, etc.) on the PS system instead.
In other words, there are two questions.
Q1. How can we generate files per event in PS/processor?
Q2. How do we keep writing data to files even after a reboot in PS/processor? We are using a ZCU111 board and matlab/simulink to implement RFSoC logics. We are developing using the example on the Matlab website ( https://www.mathworks.com/help/soc/ug/ReceiveSignalWaveformUsingDDR4onXilinxRFSoCDevice.html ). There are PL and PS/processor in RFSoC. We want to create/generate data in PL and save data in PS.
Currently, a file has been created in PS. It is not the data we want, but it is writing something. However, after rebooting, it can no longer write data. Also, it is currently writing data to only one file, but we want to manage data events for multiple files. We are saving data in a set of FIFOs and are able to read it out to the computer, but we want to save this data as incrementally named files (event1, event2, etc.) on the PS system instead.
In other words, there are two questions.
Q1. How can we generate files per event in PS/processor?
Q2. How do we keep writing data to files even after a reboot in PS/processor? write file in ps/processor MATLAB Answers — New Questions
How to evaluate if my design/matlab code/algorithm can be dumped in controller or processor or fpga or gpu?
I would like to know how can I see what can i use for my application for example:
i am trying to do take image and do the segmentation using blob analysis to identify a object in an image or video. how to determine whether i would need a controller or microprocessor or fpga or gpu ?I would like to know how can I see what can i use for my application for example:
i am trying to do take image and do the segmentation using blob analysis to identify a object in an image or video. how to determine whether i would need a controller or microprocessor or fpga or gpu ? I would like to know how can I see what can i use for my application for example:
i am trying to do take image and do the segmentation using blob analysis to identify a object in an image or video. how to determine whether i would need a controller or microprocessor or fpga or gpu ? fpga, gpu, controller, processor MATLAB Answers — New Questions
How to put parameters in pv array?
Hello,
How can I put these parametrs do this pv array in simulink?Hello,
How can I put these parametrs do this pv array in simulink? Hello,
How can I put these parametrs do this pv array in simulink? arrays, matlab, simulink MATLAB Answers — New Questions
Is there a quick function to make an array whose elements are the sum of the row and column numbers?
Hello! This should hopefully be a quick and easy question:
Is there a function such that the output of Fun(4) would be:
[2 3 4 5;
3 4 5 6;
4 5 6 7;
5 6 7 8]
i.e. each element of the matrix is equal to its row number + its column number?
I cannot figure out a way to search this question in a concise manner, so I haven’t been able to find anything. I know this is fairly simple to code, but I’m curious if there’s an already existing function for this. Thanks!Hello! This should hopefully be a quick and easy question:
Is there a function such that the output of Fun(4) would be:
[2 3 4 5;
3 4 5 6;
4 5 6 7;
5 6 7 8]
i.e. each element of the matrix is equal to its row number + its column number?
I cannot figure out a way to search this question in a concise manner, so I haven’t been able to find anything. I know this is fairly simple to code, but I’m curious if there’s an already existing function for this. Thanks! Hello! This should hopefully be a quick and easy question:
Is there a function such that the output of Fun(4) would be:
[2 3 4 5;
3 4 5 6;
4 5 6 7;
5 6 7 8]
i.e. each element of the matrix is equal to its row number + its column number?
I cannot figure out a way to search this question in a concise manner, so I haven’t been able to find anything. I know this is fairly simple to code, but I’m curious if there’s an already existing function for this. Thanks! arrays, sum MATLAB Answers — New Questions
Matlab Online S3 speed: copyfile vs. websave
I benchmarked some reads from an s3 bucket via the URL and https (with websave) and via the S3 URI (via copyfile) in Matlab Online.
I performed two benchmarks. I downloaded the same 750 MB file 10 times by websave or copyfile and calculated the average time, and then I downloaded a 119.9 MB file a single time via both methods.
The stats:
750MB file read 10 times:
copyfile via s3: 38.4165 MB/sec
websave via https: 71.8340 MB/sec
119.9MB file read once:
copyfile via s3: 9.0168 MB/sec
web save via https: 27.7525 MB/sec
I was surprised to see that accessing the URL via https was faster than reading directly from the S3 bucket on Matlab Online. I thought Matlab Online ran on AWS and I had expected direct S3 access to be faster.
Can anyone comment on whether this is the expected behavior?
Thanks
SteveI benchmarked some reads from an s3 bucket via the URL and https (with websave) and via the S3 URI (via copyfile) in Matlab Online.
I performed two benchmarks. I downloaded the same 750 MB file 10 times by websave or copyfile and calculated the average time, and then I downloaded a 119.9 MB file a single time via both methods.
The stats:
750MB file read 10 times:
copyfile via s3: 38.4165 MB/sec
websave via https: 71.8340 MB/sec
119.9MB file read once:
copyfile via s3: 9.0168 MB/sec
web save via https: 27.7525 MB/sec
I was surprised to see that accessing the URL via https was faster than reading directly from the S3 bucket on Matlab Online. I thought Matlab Online ran on AWS and I had expected direct S3 access to be faster.
Can anyone comment on whether this is the expected behavior?
Thanks
Steve I benchmarked some reads from an s3 bucket via the URL and https (with websave) and via the S3 URI (via copyfile) in Matlab Online.
I performed two benchmarks. I downloaded the same 750 MB file 10 times by websave or copyfile and calculated the average time, and then I downloaded a 119.9 MB file a single time via both methods.
The stats:
750MB file read 10 times:
copyfile via s3: 38.4165 MB/sec
websave via https: 71.8340 MB/sec
119.9MB file read once:
copyfile via s3: 9.0168 MB/sec
web save via https: 27.7525 MB/sec
I was surprised to see that accessing the URL via https was faster than reading directly from the S3 bucket on Matlab Online. I thought Matlab Online ran on AWS and I had expected direct S3 access to be faster.
Can anyone comment on whether this is the expected behavior?
Thanks
Steve matlab online, s3 MATLAB Answers — New Questions
Transparency Ghosting Effect in Rendering of Ellipsoid Surfaces
I have been attempting to render ellipsoids of various scales and rotations in MATLAB using the built-in ellipsoid() function; however, I have run into repeated graphical errors when rendering these for which I have been unable to pin down a cause.
Specifically, some ellipsoids will display a sort of "ghosting" effect, in which the opacity of the ellipsoid will change suddenly despite a constant FaceAlpha value. Attached are several screenshots of the issue:
I have noticed the following patterns with the ghosting:
The ghosting effect appears to depend on window size
Ellipsoids can be fully ghosted (i.e., much more transparent than expected)
The ghosting appears to happen when one axis of the ellipsoid is much shorter than the other two
The ghosting is very dependent on the camera angle
The ghosting appears to be dependent on the rotation of the ellipsoid (I have yet to generate a single axis-aligned ellipsoid that suffers from ghosting)
The ghosting happens for a wide range of FaceAlpha values
I have tested ellipsoid generation on both Windows and Linux, as well as using both R2019b and R2024a, and all display this ghosting effect for some cases (it is not predictable when or for which view angles as far as I can tell). I am using OpenGL hardware rendering on Windows.
My questions are as follows:
What is the root cause of this issue?
Is there a workaround that will work for any orientation and size of ellipsoid?
Thank you for your time.
The following script was used to generate the ellipsoids in the images above (on a Windows machine running R2019b with OpenGL hardware rendering and Intel UHD Graphics 620 graphics unit):
% Generate a random rotation matrix
L = randn(3);
C = L * L’;
[V, ~] = eig(C);
if det(V) == -1
V(:, 2) = -V(:, 2);
end
% Ellipsoid axis sizes
D = [20, 5, 0.01];
% Generate 101 x 101 meshgrids for ellipsoid coordinates
[X, Y, Z] = ellipsoid(0, 0, 0, D(1), D(2), D(3), 100);
% Rotate ellipsoid into frame defined by rotation matrix
coords = (V * [X(:)’; Y(:)’; Z(:)’])’;
% Convert points back into meshgrids
X = reshape(coords(:, 1), size(X));
Y = reshape(coords(:, 2), size(Y));
Z = reshape(coords(:, 3), size(Z));
figure();
hold on;
surf(X, Y, Z, ‘EdgeColor’, ‘none’, ‘FaceColor’, ‘b’, ‘FaceAlpha’, 0.5);I have been attempting to render ellipsoids of various scales and rotations in MATLAB using the built-in ellipsoid() function; however, I have run into repeated graphical errors when rendering these for which I have been unable to pin down a cause.
Specifically, some ellipsoids will display a sort of "ghosting" effect, in which the opacity of the ellipsoid will change suddenly despite a constant FaceAlpha value. Attached are several screenshots of the issue:
I have noticed the following patterns with the ghosting:
The ghosting effect appears to depend on window size
Ellipsoids can be fully ghosted (i.e., much more transparent than expected)
The ghosting appears to happen when one axis of the ellipsoid is much shorter than the other two
The ghosting is very dependent on the camera angle
The ghosting appears to be dependent on the rotation of the ellipsoid (I have yet to generate a single axis-aligned ellipsoid that suffers from ghosting)
The ghosting happens for a wide range of FaceAlpha values
I have tested ellipsoid generation on both Windows and Linux, as well as using both R2019b and R2024a, and all display this ghosting effect for some cases (it is not predictable when or for which view angles as far as I can tell). I am using OpenGL hardware rendering on Windows.
My questions are as follows:
What is the root cause of this issue?
Is there a workaround that will work for any orientation and size of ellipsoid?
Thank you for your time.
The following script was used to generate the ellipsoids in the images above (on a Windows machine running R2019b with OpenGL hardware rendering and Intel UHD Graphics 620 graphics unit):
% Generate a random rotation matrix
L = randn(3);
C = L * L’;
[V, ~] = eig(C);
if det(V) == -1
V(:, 2) = -V(:, 2);
end
% Ellipsoid axis sizes
D = [20, 5, 0.01];
% Generate 101 x 101 meshgrids for ellipsoid coordinates
[X, Y, Z] = ellipsoid(0, 0, 0, D(1), D(2), D(3), 100);
% Rotate ellipsoid into frame defined by rotation matrix
coords = (V * [X(:)’; Y(:)’; Z(:)’])’;
% Convert points back into meshgrids
X = reshape(coords(:, 1), size(X));
Y = reshape(coords(:, 2), size(Y));
Z = reshape(coords(:, 3), size(Z));
figure();
hold on;
surf(X, Y, Z, ‘EdgeColor’, ‘none’, ‘FaceColor’, ‘b’, ‘FaceAlpha’, 0.5); I have been attempting to render ellipsoids of various scales and rotations in MATLAB using the built-in ellipsoid() function; however, I have run into repeated graphical errors when rendering these for which I have been unable to pin down a cause.
Specifically, some ellipsoids will display a sort of "ghosting" effect, in which the opacity of the ellipsoid will change suddenly despite a constant FaceAlpha value. Attached are several screenshots of the issue:
I have noticed the following patterns with the ghosting:
The ghosting effect appears to depend on window size
Ellipsoids can be fully ghosted (i.e., much more transparent than expected)
The ghosting appears to happen when one axis of the ellipsoid is much shorter than the other two
The ghosting is very dependent on the camera angle
The ghosting appears to be dependent on the rotation of the ellipsoid (I have yet to generate a single axis-aligned ellipsoid that suffers from ghosting)
The ghosting happens for a wide range of FaceAlpha values
I have tested ellipsoid generation on both Windows and Linux, as well as using both R2019b and R2024a, and all display this ghosting effect for some cases (it is not predictable when or for which view angles as far as I can tell). I am using OpenGL hardware rendering on Windows.
My questions are as follows:
What is the root cause of this issue?
Is there a workaround that will work for any orientation and size of ellipsoid?
Thank you for your time.
The following script was used to generate the ellipsoids in the images above (on a Windows machine running R2019b with OpenGL hardware rendering and Intel UHD Graphics 620 graphics unit):
% Generate a random rotation matrix
L = randn(3);
C = L * L’;
[V, ~] = eig(C);
if det(V) == -1
V(:, 2) = -V(:, 2);
end
% Ellipsoid axis sizes
D = [20, 5, 0.01];
% Generate 101 x 101 meshgrids for ellipsoid coordinates
[X, Y, Z] = ellipsoid(0, 0, 0, D(1), D(2), D(3), 100);
% Rotate ellipsoid into frame defined by rotation matrix
coords = (V * [X(:)’; Y(:)’; Z(:)’])’;
% Convert points back into meshgrids
X = reshape(coords(:, 1), size(X));
Y = reshape(coords(:, 2), size(Y));
Z = reshape(coords(:, 3), size(Z));
figure();
hold on;
surf(X, Y, Z, ‘EdgeColor’, ‘none’, ‘FaceColor’, ‘b’, ‘FaceAlpha’, 0.5); transparency, graphics, rendering, surfaces MATLAB Answers — New Questions
How to plot a 3D cube based if i have the coordinates of the 8 surrounding nodes?
Hello community,
I want to plot a 3d cube based on the coordinates of my geometry (8 nodes). The coordinates of my cube are:
coord=[0 0 0;
0.5 0 0;
0.5 0.5 0;
0 0.5 0;
0 0 0.5;
0.5 0 0.5;
0.5 0.5 0.5;
0 0.5 0.5;];
Thanks a lot in advance.Hello community,
I want to plot a 3d cube based on the coordinates of my geometry (8 nodes). The coordinates of my cube are:
coord=[0 0 0;
0.5 0 0;
0.5 0.5 0;
0 0.5 0;
0 0 0.5;
0.5 0 0.5;
0.5 0.5 0.5;
0 0.5 0.5;];
Thanks a lot in advance. Hello community,
I want to plot a 3d cube based on the coordinates of my geometry (8 nodes). The coordinates of my cube are:
coord=[0 0 0;
0.5 0 0;
0.5 0.5 0;
0 0.5 0;
0 0 0.5;
0.5 0 0.5;
0.5 0.5 0.5;
0 0.5 0.5;];
Thanks a lot in advance. 3d plots, cube MATLAB Answers — New Questions
Adding sigstar to grouped bar graph
Hello,
I have sets of data that is being compared within each group. However, I need to display all of the groups on one graph so I can show how differences compare across various participants. Right now, this is the graph that I have. I would like to add sigmas between various blue, red, yellow bars depending of the results of the individual participant. Does anyone know how I could possible do that?
Thank you for your time!Hello,
I have sets of data that is being compared within each group. However, I need to display all of the groups on one graph so I can show how differences compare across various participants. Right now, this is the graph that I have. I would like to add sigmas between various blue, red, yellow bars depending of the results of the individual participant. Does anyone know how I could possible do that?
Thank you for your time! Hello,
I have sets of data that is being compared within each group. However, I need to display all of the groups on one graph so I can show how differences compare across various participants. Right now, this is the graph that I have. I would like to add sigmas between various blue, red, yellow bars depending of the results of the individual participant. Does anyone know how I could possible do that?
Thank you for your time! sigstar, bargraph MATLAB Answers — New Questions
Debugger quits working in App Designer right after StartupFcn completes.
After a week of struggling with the Serial callback not working I undated to Update 8 of 2023b and that finally resolved. (I think)
MATLAB Version: 23.2.0.2599560 (R2023b) Update 8
Now (and before too but I had other problem to deal with) my program runs with AppDesigner but the debugger stops after StartupFcn completes. I can step to here:
% Construct app
function app = MouseOdor4
runningApp = getRunningApp(app);
"blah blah blah
if nargout == 0
clear app
end
end % last line where debugger is still running
The next step the debugger stops (my app is still running) and the editor pops up this with cursor as classdef but no marker for what line we are on.
classdef AppManagementService < handle
% APPMANAGEMENTSERVICE Singleton object to manage running apps
Any clues anyone? I’d like to get this project done!After a week of struggling with the Serial callback not working I undated to Update 8 of 2023b and that finally resolved. (I think)
MATLAB Version: 23.2.0.2599560 (R2023b) Update 8
Now (and before too but I had other problem to deal with) my program runs with AppDesigner but the debugger stops after StartupFcn completes. I can step to here:
% Construct app
function app = MouseOdor4
runningApp = getRunningApp(app);
"blah blah blah
if nargout == 0
clear app
end
end % last line where debugger is still running
The next step the debugger stops (my app is still running) and the editor pops up this with cursor as classdef but no marker for what line we are on.
classdef AppManagementService < handle
% APPMANAGEMENTSERVICE Singleton object to manage running apps
Any clues anyone? I’d like to get this project done! After a week of struggling with the Serial callback not working I undated to Update 8 of 2023b and that finally resolved. (I think)
MATLAB Version: 23.2.0.2599560 (R2023b) Update 8
Now (and before too but I had other problem to deal with) my program runs with AppDesigner but the debugger stops after StartupFcn completes. I can step to here:
% Construct app
function app = MouseOdor4
runningApp = getRunningApp(app);
"blah blah blah
if nargout == 0
clear app
end
end % last line where debugger is still running
The next step the debugger stops (my app is still running) and the editor pops up this with cursor as classdef but no marker for what line we are on.
classdef AppManagementService < handle
% APPMANAGEMENTSERVICE Singleton object to manage running apps
Any clues anyone? I’d like to get this project done! app designer debugger, crash MATLAB Answers — New Questions
Run simulink simulation in deployed app with from workspace block
Hi,
I am running Matlab 2023b. Now let me explain my situation:
I have an app that reads data with an external DLL. That works fine and the signals are stored in a variable called data.
The data variable looks like this:
In the model I use from workspace blocks like that:
After reading the data, I assign from the app to the base workspace so the simulink model can access it.
assignin(‘base’,’data’,app.data);
assignin(‘base’,’StopTime’,StopTime);
Afterwards I can run the simulation and provide the output to the app.
app.out = sim(‘LMDhDataCheck_Model’);
All of that works fine. Now to my problem. When I compile the app as standalone it does not read the input correctly.
I have tried already to precompile the model and then starting the exe, which does not work. It seems like the input is 0 all the time.
if isdeployed
% Code that gets run only by compiled applications
disp(‘Run deployed simulink sim’);
!LMDhDataCheck_Model;
load(‘LMDhDataCheck_Model.mat’);
vars = who();
TF = contains(vars, ‘rt_’);
varsFiltered = vars(TF);
for i = 1:length(varsFiltered)
app.out.(eraseBetween((varsFiltered{i,1}),1,3)) = eval((varsFiltered{i,1}));
end
else
% Code that gets run only in development environment
disp(‘Run development simulink sim’);
app.out = sim(‘LMDhDataCheck_Model’);
end
Then I tried to run the following code in the workspace before putting it in the app, but I get an error:
The tuned value of the variable ‘data’ (in the workspace ‘global-workspace’) has a different type than the variable’s default value.
in = Simulink.SimulationInput(‘LMDhDataCheck_Model’)
in = simulink.compiler.configureForDeployment(in)
in = setVariable(in, ‘data’, data)
in = setVariable(in, ‘StopTime’, StopTime)
out = sim(in)
Any help will be appriciated as I cannot find an answer in the forums.Hi,
I am running Matlab 2023b. Now let me explain my situation:
I have an app that reads data with an external DLL. That works fine and the signals are stored in a variable called data.
The data variable looks like this:
In the model I use from workspace blocks like that:
After reading the data, I assign from the app to the base workspace so the simulink model can access it.
assignin(‘base’,’data’,app.data);
assignin(‘base’,’StopTime’,StopTime);
Afterwards I can run the simulation and provide the output to the app.
app.out = sim(‘LMDhDataCheck_Model’);
All of that works fine. Now to my problem. When I compile the app as standalone it does not read the input correctly.
I have tried already to precompile the model and then starting the exe, which does not work. It seems like the input is 0 all the time.
if isdeployed
% Code that gets run only by compiled applications
disp(‘Run deployed simulink sim’);
!LMDhDataCheck_Model;
load(‘LMDhDataCheck_Model.mat’);
vars = who();
TF = contains(vars, ‘rt_’);
varsFiltered = vars(TF);
for i = 1:length(varsFiltered)
app.out.(eraseBetween((varsFiltered{i,1}),1,3)) = eval((varsFiltered{i,1}));
end
else
% Code that gets run only in development environment
disp(‘Run development simulink sim’);
app.out = sim(‘LMDhDataCheck_Model’);
end
Then I tried to run the following code in the workspace before putting it in the app, but I get an error:
The tuned value of the variable ‘data’ (in the workspace ‘global-workspace’) has a different type than the variable’s default value.
in = Simulink.SimulationInput(‘LMDhDataCheck_Model’)
in = simulink.compiler.configureForDeployment(in)
in = setVariable(in, ‘data’, data)
in = setVariable(in, ‘StopTime’, StopTime)
out = sim(in)
Any help will be appriciated as I cannot find an answer in the forums. Hi,
I am running Matlab 2023b. Now let me explain my situation:
I have an app that reads data with an external DLL. That works fine and the signals are stored in a variable called data.
The data variable looks like this:
In the model I use from workspace blocks like that:
After reading the data, I assign from the app to the base workspace so the simulink model can access it.
assignin(‘base’,’data’,app.data);
assignin(‘base’,’StopTime’,StopTime);
Afterwards I can run the simulation and provide the output to the app.
app.out = sim(‘LMDhDataCheck_Model’);
All of that works fine. Now to my problem. When I compile the app as standalone it does not read the input correctly.
I have tried already to precompile the model and then starting the exe, which does not work. It seems like the input is 0 all the time.
if isdeployed
% Code that gets run only by compiled applications
disp(‘Run deployed simulink sim’);
!LMDhDataCheck_Model;
load(‘LMDhDataCheck_Model.mat’);
vars = who();
TF = contains(vars, ‘rt_’);
varsFiltered = vars(TF);
for i = 1:length(varsFiltered)
app.out.(eraseBetween((varsFiltered{i,1}),1,3)) = eval((varsFiltered{i,1}));
end
else
% Code that gets run only in development environment
disp(‘Run development simulink sim’);
app.out = sim(‘LMDhDataCheck_Model’);
end
Then I tried to run the following code in the workspace before putting it in the app, but I get an error:
The tuned value of the variable ‘data’ (in the workspace ‘global-workspace’) has a different type than the variable’s default value.
in = Simulink.SimulationInput(‘LMDhDataCheck_Model’)
in = simulink.compiler.configureForDeployment(in)
in = setVariable(in, ‘data’, data)
in = setVariable(in, ‘StopTime’, StopTime)
out = sim(in)
Any help will be appriciated as I cannot find an answer in the forums. appdesigner, simulink, standalone MATLAB Answers — New Questions
Connecting to a serial port in App Designer
Hello,
I want to connect to a serial port using App Designer, I know how to just use it over the command line but in App Designer I am not sure how to do two things, first how do I connect to the device at once rather than connecting to the device everytime I press a button, second I want to define a variable "rel" through which I can define how much the piezo stage can move. But for the error that I am getting is
Reference to non-existent field ‘rel’.
Error in app1/upButtonPushed (line 29)
temp=app.rel.Value
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 335)
Error while evaluating Button PrivateButtonPushedFcn.
The code fo the APP designer is:
classdef app1 < matlab.apps.AppBase
% Properties that correspond to app components
properties (Access = public)
UIFigure matlab.ui.Figure
up matlab.ui.control.Button
left matlab.ui.control.Button
right matlab.ui.control.Button
down matlab.ui.control.Button
relEditFieldLabel matlab.ui.control.Label
rel matlab.ui.control.NumericEditField
end
properties (Access = public)
s % Description
end
% Callbacks that handle component events
methods (Access = private)
% Button pushed function: up
function upButtonPushed(app, event)
clear all
app.s = serialport("COM5",38400);
configureTerminator(app.s,"CR")
temp=app.rel.Value
writeline(app.s, sprintf(‘2MVR%d’,temp));
%writeline(app.s, ‘2MVR-2’);
%data=readline(s)
end
% Button pushed function: left
function leftButtonPushed(app, event)
clear all
app.s = serialport("COM5",38400);
configureTerminator(app.s,"CR")
writeline(app.s, ‘1MVR2’);
end
% Button pushed function: right
function rightButtonPushed(app, event)
clear all
app.s = serialport("COM5",38400);
configureTerminator(app.s,"CR")
writeline(app.s, ‘1MVR-2’);
end
% Button pushed function: down
function downButtonPushed(app, event)
clear all
app.s = serialport("COM5",38400);
configureTerminator(app.s,"CR")
writeline(app.s, ‘2MVR2’);
end
end
% Component initialization
methods (Access = private)
% Create UIFigure and components
function createComponents(app)
% Create UIFigure and hide until all components are created
app.UIFigure = uifigure(‘Visible’, ‘off’);
app.UIFigure.Position = [100 100 319 165];
app.UIFigure.Name = ‘UI Figure’;
% Create up
app.up = uibutton(app.UIFigure, ‘push’);
app.up.ButtonPushedFcn = createCallbackFcn(app, @upButtonPushed, true);
app.up.Icon = ‘icons8-collapse-arrow-48.png’;
app.up.Position = [73 115 39 22];
app.up.Text = ”;
% Create left
app.left = uibutton(app.UIFigure, ‘push’);
app.left.ButtonPushedFcn = createCallbackFcn(app, @leftButtonPushed, true);
app.left.Icon = ‘icons8-back-48.png’;
app.left.Position = [18 71 39 22];
app.left.Text = ”;
% Create right
app.right = uibutton(app.UIFigure, ‘push’);
app.right.ButtonPushedFcn = createCallbackFcn(app, @rightButtonPushed, true);
app.right.Icon = ‘icons8-forward-48.png’;
app.right.Position = [128 71 39 22];
app.right.Text = ”;
% Create down
app.down = uibutton(app.UIFigure, ‘push’);
app.down.ButtonPushedFcn = createCallbackFcn(app, @downButtonPushed, true);
app.down.Icon = ‘icons8-expand-arrow-48.png’;
app.down.Position = [73 31 39 22];
app.down.Text = ”;
% Create relEditFieldLabel
app.relEditFieldLabel = uilabel(app.UIFigure);
app.relEditFieldLabel.HorizontalAlignment = ‘right’;
app.relEditFieldLabel.Position = [158 125 25 22];
app.relEditFieldLabel.Text = ‘rel’;
% Create rel
app.rel = uieditfield(app.UIFigure, ‘numeric’);
app.rel.Position = [198 125 100 22];
app.rel.Value = -2;
% Show the figure after all components are created
app.UIFigure.Visible = ‘on’;
end
end
% App creation and deletion
methods (Access = public)
% Construct app
function app = app1
% Create UIFigure and components
createComponents(app)
% Register the app with App Designer
registerApp(app, app.UIFigure)
if nargout == 0
clear app
end
end
% Code that executes before app deletion
function delete(app)
% Delete UIFigure when app is deleted
delete(app.UIFigure)
end
end
endHello,
I want to connect to a serial port using App Designer, I know how to just use it over the command line but in App Designer I am not sure how to do two things, first how do I connect to the device at once rather than connecting to the device everytime I press a button, second I want to define a variable "rel" through which I can define how much the piezo stage can move. But for the error that I am getting is
Reference to non-existent field ‘rel’.
Error in app1/upButtonPushed (line 29)
temp=app.rel.Value
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 335)
Error while evaluating Button PrivateButtonPushedFcn.
The code fo the APP designer is:
classdef app1 < matlab.apps.AppBase
% Properties that correspond to app components
properties (Access = public)
UIFigure matlab.ui.Figure
up matlab.ui.control.Button
left matlab.ui.control.Button
right matlab.ui.control.Button
down matlab.ui.control.Button
relEditFieldLabel matlab.ui.control.Label
rel matlab.ui.control.NumericEditField
end
properties (Access = public)
s % Description
end
% Callbacks that handle component events
methods (Access = private)
% Button pushed function: up
function upButtonPushed(app, event)
clear all
app.s = serialport("COM5",38400);
configureTerminator(app.s,"CR")
temp=app.rel.Value
writeline(app.s, sprintf(‘2MVR%d’,temp));
%writeline(app.s, ‘2MVR-2’);
%data=readline(s)
end
% Button pushed function: left
function leftButtonPushed(app, event)
clear all
app.s = serialport("COM5",38400);
configureTerminator(app.s,"CR")
writeline(app.s, ‘1MVR2’);
end
% Button pushed function: right
function rightButtonPushed(app, event)
clear all
app.s = serialport("COM5",38400);
configureTerminator(app.s,"CR")
writeline(app.s, ‘1MVR-2’);
end
% Button pushed function: down
function downButtonPushed(app, event)
clear all
app.s = serialport("COM5",38400);
configureTerminator(app.s,"CR")
writeline(app.s, ‘2MVR2’);
end
end
% Component initialization
methods (Access = private)
% Create UIFigure and components
function createComponents(app)
% Create UIFigure and hide until all components are created
app.UIFigure = uifigure(‘Visible’, ‘off’);
app.UIFigure.Position = [100 100 319 165];
app.UIFigure.Name = ‘UI Figure’;
% Create up
app.up = uibutton(app.UIFigure, ‘push’);
app.up.ButtonPushedFcn = createCallbackFcn(app, @upButtonPushed, true);
app.up.Icon = ‘icons8-collapse-arrow-48.png’;
app.up.Position = [73 115 39 22];
app.up.Text = ”;
% Create left
app.left = uibutton(app.UIFigure, ‘push’);
app.left.ButtonPushedFcn = createCallbackFcn(app, @leftButtonPushed, true);
app.left.Icon = ‘icons8-back-48.png’;
app.left.Position = [18 71 39 22];
app.left.Text = ”;
% Create right
app.right = uibutton(app.UIFigure, ‘push’);
app.right.ButtonPushedFcn = createCallbackFcn(app, @rightButtonPushed, true);
app.right.Icon = ‘icons8-forward-48.png’;
app.right.Position = [128 71 39 22];
app.right.Text = ”;
% Create down
app.down = uibutton(app.UIFigure, ‘push’);
app.down.ButtonPushedFcn = createCallbackFcn(app, @downButtonPushed, true);
app.down.Icon = ‘icons8-expand-arrow-48.png’;
app.down.Position = [73 31 39 22];
app.down.Text = ”;
% Create relEditFieldLabel
app.relEditFieldLabel = uilabel(app.UIFigure);
app.relEditFieldLabel.HorizontalAlignment = ‘right’;
app.relEditFieldLabel.Position = [158 125 25 22];
app.relEditFieldLabel.Text = ‘rel’;
% Create rel
app.rel = uieditfield(app.UIFigure, ‘numeric’);
app.rel.Position = [198 125 100 22];
app.rel.Value = -2;
% Show the figure after all components are created
app.UIFigure.Visible = ‘on’;
end
end
% App creation and deletion
methods (Access = public)
% Construct app
function app = app1
% Create UIFigure and components
createComponents(app)
% Register the app with App Designer
registerApp(app, app.UIFigure)
if nargout == 0
clear app
end
end
% Code that executes before app deletion
function delete(app)
% Delete UIFigure when app is deleted
delete(app.UIFigure)
end
end
end Hello,
I want to connect to a serial port using App Designer, I know how to just use it over the command line but in App Designer I am not sure how to do two things, first how do I connect to the device at once rather than connecting to the device everytime I press a button, second I want to define a variable "rel" through which I can define how much the piezo stage can move. But for the error that I am getting is
Reference to non-existent field ‘rel’.
Error in app1/upButtonPushed (line 29)
temp=app.rel.Value
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 335)
Error while evaluating Button PrivateButtonPushedFcn.
The code fo the APP designer is:
classdef app1 < matlab.apps.AppBase
% Properties that correspond to app components
properties (Access = public)
UIFigure matlab.ui.Figure
up matlab.ui.control.Button
left matlab.ui.control.Button
right matlab.ui.control.Button
down matlab.ui.control.Button
relEditFieldLabel matlab.ui.control.Label
rel matlab.ui.control.NumericEditField
end
properties (Access = public)
s % Description
end
% Callbacks that handle component events
methods (Access = private)
% Button pushed function: up
function upButtonPushed(app, event)
clear all
app.s = serialport("COM5",38400);
configureTerminator(app.s,"CR")
temp=app.rel.Value
writeline(app.s, sprintf(‘2MVR%d’,temp));
%writeline(app.s, ‘2MVR-2’);
%data=readline(s)
end
% Button pushed function: left
function leftButtonPushed(app, event)
clear all
app.s = serialport("COM5",38400);
configureTerminator(app.s,"CR")
writeline(app.s, ‘1MVR2’);
end
% Button pushed function: right
function rightButtonPushed(app, event)
clear all
app.s = serialport("COM5",38400);
configureTerminator(app.s,"CR")
writeline(app.s, ‘1MVR-2’);
end
% Button pushed function: down
function downButtonPushed(app, event)
clear all
app.s = serialport("COM5",38400);
configureTerminator(app.s,"CR")
writeline(app.s, ‘2MVR2’);
end
end
% Component initialization
methods (Access = private)
% Create UIFigure and components
function createComponents(app)
% Create UIFigure and hide until all components are created
app.UIFigure = uifigure(‘Visible’, ‘off’);
app.UIFigure.Position = [100 100 319 165];
app.UIFigure.Name = ‘UI Figure’;
% Create up
app.up = uibutton(app.UIFigure, ‘push’);
app.up.ButtonPushedFcn = createCallbackFcn(app, @upButtonPushed, true);
app.up.Icon = ‘icons8-collapse-arrow-48.png’;
app.up.Position = [73 115 39 22];
app.up.Text = ”;
% Create left
app.left = uibutton(app.UIFigure, ‘push’);
app.left.ButtonPushedFcn = createCallbackFcn(app, @leftButtonPushed, true);
app.left.Icon = ‘icons8-back-48.png’;
app.left.Position = [18 71 39 22];
app.left.Text = ”;
% Create right
app.right = uibutton(app.UIFigure, ‘push’);
app.right.ButtonPushedFcn = createCallbackFcn(app, @rightButtonPushed, true);
app.right.Icon = ‘icons8-forward-48.png’;
app.right.Position = [128 71 39 22];
app.right.Text = ”;
% Create down
app.down = uibutton(app.UIFigure, ‘push’);
app.down.ButtonPushedFcn = createCallbackFcn(app, @downButtonPushed, true);
app.down.Icon = ‘icons8-expand-arrow-48.png’;
app.down.Position = [73 31 39 22];
app.down.Text = ”;
% Create relEditFieldLabel
app.relEditFieldLabel = uilabel(app.UIFigure);
app.relEditFieldLabel.HorizontalAlignment = ‘right’;
app.relEditFieldLabel.Position = [158 125 25 22];
app.relEditFieldLabel.Text = ‘rel’;
% Create rel
app.rel = uieditfield(app.UIFigure, ‘numeric’);
app.rel.Position = [198 125 100 22];
app.rel.Value = -2;
% Show the figure after all components are created
app.UIFigure.Visible = ‘on’;
end
end
% App creation and deletion
methods (Access = public)
% Construct app
function app = app1
% Create UIFigure and components
createComponents(app)
% Register the app with App Designer
registerApp(app, app.UIFigure)
if nargout == 0
clear app
end
end
% Code that executes before app deletion
function delete(app)
% Delete UIFigure when app is deleted
delete(app.UIFigure)
end
end
end app designer MATLAB Answers — New Questions
How to calculate semiMajorAxis and trueAnomaly from TLE file
Hi,
I am trying to add satelltie to satellite scenario by following the documentaion.
The general way is to simply use the TLE file
sat1 = satellite(sc,tleFile,"Name","Sat1")
If I want to find the Keplerian elements the function orbitalElements(sat1) can give eccentricity, inclination, rightAscensionOfAscendingNode and argumentOfPeriapsis. But how does MATLAB computes semiMajorAxis and trueAnomaly?
Any help is appreicated.
Thank youHi,
I am trying to add satelltie to satellite scenario by following the documentaion.
The general way is to simply use the TLE file
sat1 = satellite(sc,tleFile,"Name","Sat1")
If I want to find the Keplerian elements the function orbitalElements(sat1) can give eccentricity, inclination, rightAscensionOfAscendingNode and argumentOfPeriapsis. But how does MATLAB computes semiMajorAxis and trueAnomaly?
Any help is appreicated.
Thank you Hi,
I am trying to add satelltie to satellite scenario by following the documentaion.
The general way is to simply use the TLE file
sat1 = satellite(sc,tleFile,"Name","Sat1")
If I want to find the Keplerian elements the function orbitalElements(sat1) can give eccentricity, inclination, rightAscensionOfAscendingNode and argumentOfPeriapsis. But how does MATLAB computes semiMajorAxis and trueAnomaly?
Any help is appreicated.
Thank you matlab, communication MATLAB Answers — New Questions
online tools for classification learner
I’m doing the online course of machine learning with MATLAB but in some cases when i try to run the classification learner automatically MATLAB’S session turn off. I can’t to continue because in the activity "Improving Predictive ModelsHyperparameter Optimization(4/4) Optimize Hyperparameters in Classification Learner" , in activity three matlab send a message 🙁 MATLAB found a problem and close the activity).I’m doing the online course of machine learning with MATLAB but in some cases when i try to run the classification learner automatically MATLAB’S session turn off. I can’t to continue because in the activity "Improving Predictive ModelsHyperparameter Optimization(4/4) Optimize Hyperparameters in Classification Learner" , in activity three matlab send a message 🙁 MATLAB found a problem and close the activity). I’m doing the online course of machine learning with MATLAB but in some cases when i try to run the classification learner automatically MATLAB’S session turn off. I can’t to continue because in the activity "Improving Predictive ModelsHyperparameter Optimization(4/4) Optimize Hyperparameters in Classification Learner" , in activity three matlab send a message 🙁 MATLAB found a problem and close the activity). matlab encountered a problem MATLAB Answers — New Questions
How to load input data to Fuzzy logic designer to validate the system
I’ve designed a fuzzy inference system using the fuzzy logic designer app. I now want to validate the deisgn with a dataset but do not know how to create or load a file into fuzzy logic designer.
I managed to get a data file into the workspace but when I try to select the data it cannot be seen in the worksapce.
Some guidance on how to create input data files and load them for simualtion would be helpful – thanks.I’ve designed a fuzzy inference system using the fuzzy logic designer app. I now want to validate the deisgn with a dataset but do not know how to create or load a file into fuzzy logic designer.
I managed to get a data file into the workspace but when I try to select the data it cannot be seen in the worksapce.
Some guidance on how to create input data files and load them for simualtion would be helpful – thanks. I’ve designed a fuzzy inference system using the fuzzy logic designer app. I now want to validate the deisgn with a dataset but do not know how to create or load a file into fuzzy logic designer.
I managed to get a data file into the workspace but when I try to select the data it cannot be seen in the worksapce.
Some guidance on how to create input data files and load them for simualtion would be helpful – thanks. fuzzy logic designer app, system vailidation, input data MATLAB Answers — New Questions
Can’t use daq. Unrecognized function or variable ‘daqregister’.
I’m completly new to mathlab.
I’m trying to use a contec force sensor and stream it too mathlab.
the main one I’m trying to do follow the guide found here:
https://www.contec.com/download/contract/contract2/?itemid=cd9cef94-04f7-430e-bb99-85e79e11d3bd&downloaditemid=4aa9af61-5eb7-496a-9212-c6a87f6d20ca
The command I’m getting stuck at is:
“`
>> daqregister(‘contec’)
Unrecognized function or variable ‘daqregister’.
Did you mean:
>> fdaregister(‘contec’)
“`
Here’s the result from a bunch of daq commands:
“`
>> devices = daq.getDevices
No data acquisition devices available.
Click here for a list of known vendors.
Click here for troubleshooting tips.
Unable to detect ‘ni’ hardware:
National Instruments NI-DAQmx driver is either not installed or the installed version is not supported.
Use the Windows Control Panel to uninstall any existing NI-DAQmx driver listed under ‘National Instruments Software’.
Then, open the Add-On Explorer to install the Data Acquisition Toolbox Support Package for
National Instruments NI-DAQmx Devices.
“`
“`
>> ver
—————————————————————————————————–
MATLAB Version: 9.7.0.1216025 (R2019b) Update 1
MATLAB License Number: *******
Operating System: Microsoft Windows 11 Pro Version 10.0 (Build 22631)
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
—————————————————————————————————–
MATLAB Version 9.7 (R2019b)
Simulink Version 10.0 (R2019b)
5G Toolbox Version 1.2 (R2019b)
AUTOSAR Blockset Version 2.1 (R2019b)
Aerospace Blockset Version 4.2 (R2019b)
Aerospace Toolbox Version 3.2 (R2019b)
Antenna Toolbox Version 4.1 (R2019b)
Audio Toolbox Version 2.1 (R2019b)
Automated Driving Toolbox Version 3.0 (R2019b)
Bioinformatics Toolbox Version 4.13 (R2019b)
Communications Toolbox Version 7.2 (R2019b)
Computer Vision Toolbox Version 9.1 (R2019b)
Control System Toolbox Version 10.7 (R2019b)
Curve Fitting Toolbox Version 3.5.10 (R2019b)
DSP System Toolbox Version 9.9 (R2019b)
Data Acquisition Toolbox Version 4.0.1 (R2019b)
Database Toolbox Version 9.2 (R2019b)
Datafeed Toolbox Version 5.9 (R2019b)
Deep Learning Toolbox Version 13.0 (R2019b)
Econometrics Toolbox Version 5.3 (R2019b)
Embedded Coder Version 7.3 (R2019b)
Filter Design HDL Coder Version 3.1.6 (R2019b)
Financial Instruments Toolbox Version 2.10 (R2019b)
Financial Toolbox Version 5.14 (R2019b)
Fixed-Point Designer Version 6.4 (R2019b)
Fuzzy Logic Toolbox Version 2.6 (R2019b)
GPU Coder Version 1.4 (R2019b)
Global Optimization Toolbox Version 4.2 (R2019b)
HDL Coder Version 3.15 (R2019b)
HDL Verifier Version 6.0 (R2019b)
Image Acquisition Toolbox Version 6.1 (R2019b)
Image Processing Toolbox Version 11.0 (R2019b)
Instrument Control Toolbox Version 4.1 (R2019b)
LTE HDL Toolbox Version 1.4 (R2019b)
LTE Toolbox Version 3.2 (R2019b)
MATLAB Coder Version 4.3 (R2019b)
MATLAB Compiler Version 7.1 (R2019b)
MATLAB Compiler SDK Version 6.7 (R2019b)
MATLAB Report Generator Version 5.7 (R2019b)
Mapping Toolbox Version 4.9 (R2019b)
Mixed-Signal Blockset Version 1.1 (R2019b)
Model Predictive Control Toolbox Version 6.3.1 (R2019b)
Model-Based Calibration Toolbox Version 5.7 (R2019b)
Navigation Toolbox Version 1.0 (R2019b)
OPC Toolbox Version 4.0.8 (R2019b)
Optimization Toolbox Version 8.4 (R2019b)
Parallel Computing Toolbox Version 7.1 (R2019b)
Partial Differential Equation Toolbox Version 3.3 (R2019b)
Phased Array System Toolbox Version 4.2 (R2019b)
Powertrain Blockset Version 1.6 (R2019b)
Predictive Maintenance Toolbox Version 2.1 (R2019b)
RF Blockset Version 7.3 (R2019b)
RF Toolbox Version 3.7 (R2019b)
ROS Toolbox Version 1.0 (R2019b)
Reinforcement Learning Toolbox Version 1.1 (R2019b)
Risk Management Toolbox Version 1.6 (R2019b)
Robotics System Toolbox Version 3.0 (R2019b)
Robust Control Toolbox Version 6.7 (R2019b)
Sensor Fusion and Tracking Toolbox Version 1.2 (R2019b)
SerDes Toolbox Version 1.1 (R2019b)
Signal Processing Toolbox Version 8.3 (R2019b)
SimBiology Version 5.9 (R2019b)
SimEvents Version 5.7 (R2019b)
Simscape Version 4.7 (R2019b)
Simscape Driveline Version 3.0 (R2019b)
Simscape Electrical Version 7.2 (R2019b)
Simscape Fluids Version 2.7 (R2019b)
Simscape Multibody Version 7.0 (R2019b)
Simulink 3D Animation Version 8.3 (R2019b)
Simulink Check Version 4.4 (R2019b)
Simulink Code Inspector Version 3.5 (R2019b)
Simulink Coder Version 9.2 (R2019b)
Simulink Control Design Version 5.4 (R2019b)
Simulink Coverage Version 4.4 (R2019b)
Simulink Design Optimization Version 3.7 (R2019b)
Simulink Design Verifier Version 4.2 (R2019b)
Simulink Desktop Real-Time Version 5.9 (R2019b)
Simulink PLC Coder Version 3.1 (R2019b)
Simulink Real-Time Version 6.11 (R2019b)
Simulink Report Generator Version 5.7 (R2019b)
Simulink Requirements Version 1.4 (R2019b)
Simulink Test Version 3.1 (R2019b)
SoC Blockset Version 1.1 (R2019b)
Spreadsheet Link Version 3.4.2 (R2019b)
Stateflow Version 10.1 (R2019b)
Statistics and Machine Learning Toolbox Version 11.6 (R2019b)
Symbolic Math Toolbox Version 8.4 (R2019b)
System Composer Version 1.1 (R2019b)
System Identification Toolbox Version 9.11 (R2019b)
Text Analytics Toolbox Version 1.4 (R2019b)
Trading Toolbox Version 3.6 (R2019b)
Vehicle Dynamics Blockset Version 1.3 (R2019b)
Vehicle Network Toolbox Version 4.3 (R2019b)
Vision HDL Toolbox Version 2.0 (R2019b)
WLAN Toolbox Version 2.2 (R2019b)
Wavelet Toolbox Version 5.3 (R2019b)
>>
“`
“`
>> daqhwinfo
Function ‘daqhwinfo’ unsupported. Use the session-based
interface.
“`
“`
>> methods(‘daq’)
No class daq.
>>>functions
Error using functions Not enough input arguments.
“`
“`
>>>doc daq
‘opens the docs’
“`I’m completly new to mathlab.
I’m trying to use a contec force sensor and stream it too mathlab.
the main one I’m trying to do follow the guide found here:
https://www.contec.com/download/contract/contract2/?itemid=cd9cef94-04f7-430e-bb99-85e79e11d3bd&downloaditemid=4aa9af61-5eb7-496a-9212-c6a87f6d20ca
The command I’m getting stuck at is:
“`
>> daqregister(‘contec’)
Unrecognized function or variable ‘daqregister’.
Did you mean:
>> fdaregister(‘contec’)
“`
Here’s the result from a bunch of daq commands:
“`
>> devices = daq.getDevices
No data acquisition devices available.
Click here for a list of known vendors.
Click here for troubleshooting tips.
Unable to detect ‘ni’ hardware:
National Instruments NI-DAQmx driver is either not installed or the installed version is not supported.
Use the Windows Control Panel to uninstall any existing NI-DAQmx driver listed under ‘National Instruments Software’.
Then, open the Add-On Explorer to install the Data Acquisition Toolbox Support Package for
National Instruments NI-DAQmx Devices.
“`
“`
>> ver
—————————————————————————————————–
MATLAB Version: 9.7.0.1216025 (R2019b) Update 1
MATLAB License Number: *******
Operating System: Microsoft Windows 11 Pro Version 10.0 (Build 22631)
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
—————————————————————————————————–
MATLAB Version 9.7 (R2019b)
Simulink Version 10.0 (R2019b)
5G Toolbox Version 1.2 (R2019b)
AUTOSAR Blockset Version 2.1 (R2019b)
Aerospace Blockset Version 4.2 (R2019b)
Aerospace Toolbox Version 3.2 (R2019b)
Antenna Toolbox Version 4.1 (R2019b)
Audio Toolbox Version 2.1 (R2019b)
Automated Driving Toolbox Version 3.0 (R2019b)
Bioinformatics Toolbox Version 4.13 (R2019b)
Communications Toolbox Version 7.2 (R2019b)
Computer Vision Toolbox Version 9.1 (R2019b)
Control System Toolbox Version 10.7 (R2019b)
Curve Fitting Toolbox Version 3.5.10 (R2019b)
DSP System Toolbox Version 9.9 (R2019b)
Data Acquisition Toolbox Version 4.0.1 (R2019b)
Database Toolbox Version 9.2 (R2019b)
Datafeed Toolbox Version 5.9 (R2019b)
Deep Learning Toolbox Version 13.0 (R2019b)
Econometrics Toolbox Version 5.3 (R2019b)
Embedded Coder Version 7.3 (R2019b)
Filter Design HDL Coder Version 3.1.6 (R2019b)
Financial Instruments Toolbox Version 2.10 (R2019b)
Financial Toolbox Version 5.14 (R2019b)
Fixed-Point Designer Version 6.4 (R2019b)
Fuzzy Logic Toolbox Version 2.6 (R2019b)
GPU Coder Version 1.4 (R2019b)
Global Optimization Toolbox Version 4.2 (R2019b)
HDL Coder Version 3.15 (R2019b)
HDL Verifier Version 6.0 (R2019b)
Image Acquisition Toolbox Version 6.1 (R2019b)
Image Processing Toolbox Version 11.0 (R2019b)
Instrument Control Toolbox Version 4.1 (R2019b)
LTE HDL Toolbox Version 1.4 (R2019b)
LTE Toolbox Version 3.2 (R2019b)
MATLAB Coder Version 4.3 (R2019b)
MATLAB Compiler Version 7.1 (R2019b)
MATLAB Compiler SDK Version 6.7 (R2019b)
MATLAB Report Generator Version 5.7 (R2019b)
Mapping Toolbox Version 4.9 (R2019b)
Mixed-Signal Blockset Version 1.1 (R2019b)
Model Predictive Control Toolbox Version 6.3.1 (R2019b)
Model-Based Calibration Toolbox Version 5.7 (R2019b)
Navigation Toolbox Version 1.0 (R2019b)
OPC Toolbox Version 4.0.8 (R2019b)
Optimization Toolbox Version 8.4 (R2019b)
Parallel Computing Toolbox Version 7.1 (R2019b)
Partial Differential Equation Toolbox Version 3.3 (R2019b)
Phased Array System Toolbox Version 4.2 (R2019b)
Powertrain Blockset Version 1.6 (R2019b)
Predictive Maintenance Toolbox Version 2.1 (R2019b)
RF Blockset Version 7.3 (R2019b)
RF Toolbox Version 3.7 (R2019b)
ROS Toolbox Version 1.0 (R2019b)
Reinforcement Learning Toolbox Version 1.1 (R2019b)
Risk Management Toolbox Version 1.6 (R2019b)
Robotics System Toolbox Version 3.0 (R2019b)
Robust Control Toolbox Version 6.7 (R2019b)
Sensor Fusion and Tracking Toolbox Version 1.2 (R2019b)
SerDes Toolbox Version 1.1 (R2019b)
Signal Processing Toolbox Version 8.3 (R2019b)
SimBiology Version 5.9 (R2019b)
SimEvents Version 5.7 (R2019b)
Simscape Version 4.7 (R2019b)
Simscape Driveline Version 3.0 (R2019b)
Simscape Electrical Version 7.2 (R2019b)
Simscape Fluids Version 2.7 (R2019b)
Simscape Multibody Version 7.0 (R2019b)
Simulink 3D Animation Version 8.3 (R2019b)
Simulink Check Version 4.4 (R2019b)
Simulink Code Inspector Version 3.5 (R2019b)
Simulink Coder Version 9.2 (R2019b)
Simulink Control Design Version 5.4 (R2019b)
Simulink Coverage Version 4.4 (R2019b)
Simulink Design Optimization Version 3.7 (R2019b)
Simulink Design Verifier Version 4.2 (R2019b)
Simulink Desktop Real-Time Version 5.9 (R2019b)
Simulink PLC Coder Version 3.1 (R2019b)
Simulink Real-Time Version 6.11 (R2019b)
Simulink Report Generator Version 5.7 (R2019b)
Simulink Requirements Version 1.4 (R2019b)
Simulink Test Version 3.1 (R2019b)
SoC Blockset Version 1.1 (R2019b)
Spreadsheet Link Version 3.4.2 (R2019b)
Stateflow Version 10.1 (R2019b)
Statistics and Machine Learning Toolbox Version 11.6 (R2019b)
Symbolic Math Toolbox Version 8.4 (R2019b)
System Composer Version 1.1 (R2019b)
System Identification Toolbox Version 9.11 (R2019b)
Text Analytics Toolbox Version 1.4 (R2019b)
Trading Toolbox Version 3.6 (R2019b)
Vehicle Dynamics Blockset Version 1.3 (R2019b)
Vehicle Network Toolbox Version 4.3 (R2019b)
Vision HDL Toolbox Version 2.0 (R2019b)
WLAN Toolbox Version 2.2 (R2019b)
Wavelet Toolbox Version 5.3 (R2019b)
>>
“`
“`
>> daqhwinfo
Function ‘daqhwinfo’ unsupported. Use the session-based
interface.
“`
“`
>> methods(‘daq’)
No class daq.
>>>functions
Error using functions Not enough input arguments.
“`
“`
>>>doc daq
‘opens the docs’
“` I’m completly new to mathlab.
I’m trying to use a contec force sensor and stream it too mathlab.
the main one I’m trying to do follow the guide found here:
https://www.contec.com/download/contract/contract2/?itemid=cd9cef94-04f7-430e-bb99-85e79e11d3bd&downloaditemid=4aa9af61-5eb7-496a-9212-c6a87f6d20ca
The command I’m getting stuck at is:
“`
>> daqregister(‘contec’)
Unrecognized function or variable ‘daqregister’.
Did you mean:
>> fdaregister(‘contec’)
“`
Here’s the result from a bunch of daq commands:
“`
>> devices = daq.getDevices
No data acquisition devices available.
Click here for a list of known vendors.
Click here for troubleshooting tips.
Unable to detect ‘ni’ hardware:
National Instruments NI-DAQmx driver is either not installed or the installed version is not supported.
Use the Windows Control Panel to uninstall any existing NI-DAQmx driver listed under ‘National Instruments Software’.
Then, open the Add-On Explorer to install the Data Acquisition Toolbox Support Package for
National Instruments NI-DAQmx Devices.
“`
“`
>> ver
—————————————————————————————————–
MATLAB Version: 9.7.0.1216025 (R2019b) Update 1
MATLAB License Number: *******
Operating System: Microsoft Windows 11 Pro Version 10.0 (Build 22631)
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
—————————————————————————————————–
MATLAB Version 9.7 (R2019b)
Simulink Version 10.0 (R2019b)
5G Toolbox Version 1.2 (R2019b)
AUTOSAR Blockset Version 2.1 (R2019b)
Aerospace Blockset Version 4.2 (R2019b)
Aerospace Toolbox Version 3.2 (R2019b)
Antenna Toolbox Version 4.1 (R2019b)
Audio Toolbox Version 2.1 (R2019b)
Automated Driving Toolbox Version 3.0 (R2019b)
Bioinformatics Toolbox Version 4.13 (R2019b)
Communications Toolbox Version 7.2 (R2019b)
Computer Vision Toolbox Version 9.1 (R2019b)
Control System Toolbox Version 10.7 (R2019b)
Curve Fitting Toolbox Version 3.5.10 (R2019b)
DSP System Toolbox Version 9.9 (R2019b)
Data Acquisition Toolbox Version 4.0.1 (R2019b)
Database Toolbox Version 9.2 (R2019b)
Datafeed Toolbox Version 5.9 (R2019b)
Deep Learning Toolbox Version 13.0 (R2019b)
Econometrics Toolbox Version 5.3 (R2019b)
Embedded Coder Version 7.3 (R2019b)
Filter Design HDL Coder Version 3.1.6 (R2019b)
Financial Instruments Toolbox Version 2.10 (R2019b)
Financial Toolbox Version 5.14 (R2019b)
Fixed-Point Designer Version 6.4 (R2019b)
Fuzzy Logic Toolbox Version 2.6 (R2019b)
GPU Coder Version 1.4 (R2019b)
Global Optimization Toolbox Version 4.2 (R2019b)
HDL Coder Version 3.15 (R2019b)
HDL Verifier Version 6.0 (R2019b)
Image Acquisition Toolbox Version 6.1 (R2019b)
Image Processing Toolbox Version 11.0 (R2019b)
Instrument Control Toolbox Version 4.1 (R2019b)
LTE HDL Toolbox Version 1.4 (R2019b)
LTE Toolbox Version 3.2 (R2019b)
MATLAB Coder Version 4.3 (R2019b)
MATLAB Compiler Version 7.1 (R2019b)
MATLAB Compiler SDK Version 6.7 (R2019b)
MATLAB Report Generator Version 5.7 (R2019b)
Mapping Toolbox Version 4.9 (R2019b)
Mixed-Signal Blockset Version 1.1 (R2019b)
Model Predictive Control Toolbox Version 6.3.1 (R2019b)
Model-Based Calibration Toolbox Version 5.7 (R2019b)
Navigation Toolbox Version 1.0 (R2019b)
OPC Toolbox Version 4.0.8 (R2019b)
Optimization Toolbox Version 8.4 (R2019b)
Parallel Computing Toolbox Version 7.1 (R2019b)
Partial Differential Equation Toolbox Version 3.3 (R2019b)
Phased Array System Toolbox Version 4.2 (R2019b)
Powertrain Blockset Version 1.6 (R2019b)
Predictive Maintenance Toolbox Version 2.1 (R2019b)
RF Blockset Version 7.3 (R2019b)
RF Toolbox Version 3.7 (R2019b)
ROS Toolbox Version 1.0 (R2019b)
Reinforcement Learning Toolbox Version 1.1 (R2019b)
Risk Management Toolbox Version 1.6 (R2019b)
Robotics System Toolbox Version 3.0 (R2019b)
Robust Control Toolbox Version 6.7 (R2019b)
Sensor Fusion and Tracking Toolbox Version 1.2 (R2019b)
SerDes Toolbox Version 1.1 (R2019b)
Signal Processing Toolbox Version 8.3 (R2019b)
SimBiology Version 5.9 (R2019b)
SimEvents Version 5.7 (R2019b)
Simscape Version 4.7 (R2019b)
Simscape Driveline Version 3.0 (R2019b)
Simscape Electrical Version 7.2 (R2019b)
Simscape Fluids Version 2.7 (R2019b)
Simscape Multibody Version 7.0 (R2019b)
Simulink 3D Animation Version 8.3 (R2019b)
Simulink Check Version 4.4 (R2019b)
Simulink Code Inspector Version 3.5 (R2019b)
Simulink Coder Version 9.2 (R2019b)
Simulink Control Design Version 5.4 (R2019b)
Simulink Coverage Version 4.4 (R2019b)
Simulink Design Optimization Version 3.7 (R2019b)
Simulink Design Verifier Version 4.2 (R2019b)
Simulink Desktop Real-Time Version 5.9 (R2019b)
Simulink PLC Coder Version 3.1 (R2019b)
Simulink Real-Time Version 6.11 (R2019b)
Simulink Report Generator Version 5.7 (R2019b)
Simulink Requirements Version 1.4 (R2019b)
Simulink Test Version 3.1 (R2019b)
SoC Blockset Version 1.1 (R2019b)
Spreadsheet Link Version 3.4.2 (R2019b)
Stateflow Version 10.1 (R2019b)
Statistics and Machine Learning Toolbox Version 11.6 (R2019b)
Symbolic Math Toolbox Version 8.4 (R2019b)
System Composer Version 1.1 (R2019b)
System Identification Toolbox Version 9.11 (R2019b)
Text Analytics Toolbox Version 1.4 (R2019b)
Trading Toolbox Version 3.6 (R2019b)
Vehicle Dynamics Blockset Version 1.3 (R2019b)
Vehicle Network Toolbox Version 4.3 (R2019b)
Vision HDL Toolbox Version 2.0 (R2019b)
WLAN Toolbox Version 2.2 (R2019b)
Wavelet Toolbox Version 5.3 (R2019b)
>>
“`
“`
>> daqhwinfo
Function ‘daqhwinfo’ unsupported. Use the session-based
interface.
“`
“`
>> methods(‘daq’)
No class daq.
>>>functions
Error using functions Not enough input arguments.
“`
“`
>>>doc daq
‘opens the docs’
“` data acquisition, daq, toolbox, register, data acquisition toolbox MATLAB Answers — New Questions
is it possible to simulate ultrasonic phased parametric array in matlab ?
Can we simulate parametric array using ultrasonic transmitter transducers in matlab using phased array APP.
How we assign single transducer element directional pattern for the phased array.Could you please address how to do it.Can we simulate parametric array using ultrasonic transmitter transducers in matlab using phased array APP.
How we assign single transducer element directional pattern for the phased array.Could you please address how to do it. Can we simulate parametric array using ultrasonic transmitter transducers in matlab using phased array APP.
How we assign single transducer element directional pattern for the phased array.Could you please address how to do it. parametric array, phased array MATLAB Answers — New Questions
How to calculate right parameters for 3-phase two winding transformer Simscape Block?
Hi. I have issues with understanding and using parameters for a 3-phase two winding power transformer Simscape Block.
Three-phase linear nonideal wye- and delta-configurable two-winding transformer with saturation capability – MATLAB (mathworks.com)
I need to simulate the voltage drop and transformer power losses in a system with a 3-phase two winding transformer. I have transformer parameters from it’s datasheet, such as rated power, rated primary and secondary voltages, rated currents. For estimation of impedances I have a short-circuit voltage, short-circuit power, no-load losses. From these I can calcualte winding impedances R1, R2, L1,L2. shunt magnetizing impedances Rm, Lm.
The problem is that I don’t know where and how to provide these parameter in Simscape block. The impedances in the block are in power and not clear which applies to what. Does enyone have more clear description of block parameters and their relativity to phisical parameters?Hi. I have issues with understanding and using parameters for a 3-phase two winding power transformer Simscape Block.
Three-phase linear nonideal wye- and delta-configurable two-winding transformer with saturation capability – MATLAB (mathworks.com)
I need to simulate the voltage drop and transformer power losses in a system with a 3-phase two winding transformer. I have transformer parameters from it’s datasheet, such as rated power, rated primary and secondary voltages, rated currents. For estimation of impedances I have a short-circuit voltage, short-circuit power, no-load losses. From these I can calcualte winding impedances R1, R2, L1,L2. shunt magnetizing impedances Rm, Lm.
The problem is that I don’t know where and how to provide these parameter in Simscape block. The impedances in the block are in power and not clear which applies to what. Does enyone have more clear description of block parameters and their relativity to phisical parameters? Hi. I have issues with understanding and using parameters for a 3-phase two winding power transformer Simscape Block.
Three-phase linear nonideal wye- and delta-configurable two-winding transformer with saturation capability – MATLAB (mathworks.com)
I need to simulate the voltage drop and transformer power losses in a system with a 3-phase two winding transformer. I have transformer parameters from it’s datasheet, such as rated power, rated primary and secondary voltages, rated currents. For estimation of impedances I have a short-circuit voltage, short-circuit power, no-load losses. From these I can calcualte winding impedances R1, R2, L1,L2. shunt magnetizing impedances Rm, Lm.
The problem is that I don’t know where and how to provide these parameter in Simscape block. The impedances in the block are in power and not clear which applies to what. Does enyone have more clear description of block parameters and their relativity to phisical parameters? transformer, simscape, 3-phase MATLAB Answers — New Questions
Plotting an image in a geospatial domain given Lat and Lon information
Dear all,
After trying everything and more, it is time to give up and ask for your help.
I do have a matrix of Lat values, a matrix of Lon values, and a matrix of actual data. I need to display this in a geospatial domain, overlaying a Shapefile. Additionally, it is essential for me to add a scale bar. I have tried, geoshow, goeplot, mapshow, worldmap, and probably something else too, but every time there is something that goes wrong (i.e., Adding GeographicAxes to axes is not supported, etc.).
The best I achieved was:
close all
clc
figure
geoshow(LAT, LON, DATA, ‘DisplayType’, ‘texturemap’);
mapshow(SHP, ‘FaceColor’, ‘none’, ‘EdgeColor’, ‘black’, ‘LineWidth’, 1.5);
colormap gray
The problem with the code above is that nothing is georeferenced and, as such, it is impossible for me to add a scale bar.
Could you please help me make a nice georeferenced map?
Any help would be greatly appreciated.
I have attached the LAT, LON, DATA, and SHP.
Thanks a lot in advanceDear all,
After trying everything and more, it is time to give up and ask for your help.
I do have a matrix of Lat values, a matrix of Lon values, and a matrix of actual data. I need to display this in a geospatial domain, overlaying a Shapefile. Additionally, it is essential for me to add a scale bar. I have tried, geoshow, goeplot, mapshow, worldmap, and probably something else too, but every time there is something that goes wrong (i.e., Adding GeographicAxes to axes is not supported, etc.).
The best I achieved was:
close all
clc
figure
geoshow(LAT, LON, DATA, ‘DisplayType’, ‘texturemap’);
mapshow(SHP, ‘FaceColor’, ‘none’, ‘EdgeColor’, ‘black’, ‘LineWidth’, 1.5);
colormap gray
The problem with the code above is that nothing is georeferenced and, as such, it is impossible for me to add a scale bar.
Could you please help me make a nice georeferenced map?
Any help would be greatly appreciated.
I have attached the LAT, LON, DATA, and SHP.
Thanks a lot in advance Dear all,
After trying everything and more, it is time to give up and ask for your help.
I do have a matrix of Lat values, a matrix of Lon values, and a matrix of actual data. I need to display this in a geospatial domain, overlaying a Shapefile. Additionally, it is essential for me to add a scale bar. I have tried, geoshow, goeplot, mapshow, worldmap, and probably something else too, but every time there is something that goes wrong (i.e., Adding GeographicAxes to axes is not supported, etc.).
The best I achieved was:
close all
clc
figure
geoshow(LAT, LON, DATA, ‘DisplayType’, ‘texturemap’);
mapshow(SHP, ‘FaceColor’, ‘none’, ‘EdgeColor’, ‘black’, ‘LineWidth’, 1.5);
colormap gray
The problem with the code above is that nothing is georeferenced and, as such, it is impossible for me to add a scale bar.
Could you please help me make a nice georeferenced map?
Any help would be greatly appreciated.
I have attached the LAT, LON, DATA, and SHP.
Thanks a lot in advance plot, geoplot, image, image analysis, image processing, geospatial, georeference, latitude, longitude MATLAB Answers — New Questions
Simulink Code inspector – Customize the header file search path
When I try to generate the Simulink Code inspector report, its defaulting to a mathdef.h located in the polyspaceveroiifiercxxinclude location. Is it possible to customize the code inspector to ignore the includes from the polyspace include location and use project specific location?When I try to generate the Simulink Code inspector report, its defaulting to a mathdef.h located in the polyspaceveroiifiercxxinclude location. Is it possible to customize the code inspector to ignore the includes from the polyspace include location and use project specific location? When I try to generate the Simulink Code inspector report, its defaulting to a mathdef.h located in the polyspaceveroiifiercxxinclude location. Is it possible to customize the code inspector to ignore the includes from the polyspace include location and use project specific location? simulink code inspector MATLAB Answers — New Questions