Category: Matlab
Category Archives: Matlab
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
Client installation package for Mathlab
Hi all,
I’m looking for a way to create a "universal" installation package for Matlab.
Our users will not have local admin and due to security policies the software is installed by packages.
However im under the impression that there is no generic software install and that all specific features require a specific installation procedure.
Can you tell me if there is a way to achieve this? Or is it an option to use the webbased version somehow?
Any help is welcome.
Regards,Hi all,
I’m looking for a way to create a "universal" installation package for Matlab.
Our users will not have local admin and due to security policies the software is installed by packages.
However im under the impression that there is no generic software install and that all specific features require a specific installation procedure.
Can you tell me if there is a way to achieve this? Or is it an option to use the webbased version somehow?
Any help is welcome.
Regards, Hi all,
I’m looking for a way to create a "universal" installation package for Matlab.
Our users will not have local admin and due to security policies the software is installed by packages.
However im under the impression that there is no generic software install and that all specific features require a specific installation procedure.
Can you tell me if there is a way to achieve this? Or is it an option to use the webbased version somehow?
Any help is welcome.
Regards, mathlab installation package MATLAB Answers — New Questions
How do I add shapes to my Simulink model
I want to add a dotted line to add clarity to my model. In addition, I want to add a box to show future addition.
I do I add static shapes and figures (rectangle) to my model?I want to add a dotted line to add clarity to my model. In addition, I want to add a box to show future addition.
I do I add static shapes and figures (rectangle) to my model? I want to add a dotted line to add clarity to my model. In addition, I want to add a box to show future addition.
I do I add static shapes and figures (rectangle) to my model? static shapes MATLAB Answers — New Questions
Complex matlab script migration into simulink
I’m currently working with a rather length Matlab script, and am trying to move it onto simulink to adopt a more ‘drag n drop’ logic flow, as in Simulink we are able to use both custom function blocks as well as default lib blocks. After trying to move this script to Simulink I realized that I have been running into a lot of code generation incompatibility errors, I’d like to ask whether I can "pull" a plot from the base Matlab workspace into Simulink when I run a Simulink function?
Say that I click on a specific block on Simulink that triggers a script in the base workspace to run, and then the results and plots from the base workspace script are "sent" to Simulink.
Is this achievable?
Thanks!I’m currently working with a rather length Matlab script, and am trying to move it onto simulink to adopt a more ‘drag n drop’ logic flow, as in Simulink we are able to use both custom function blocks as well as default lib blocks. After trying to move this script to Simulink I realized that I have been running into a lot of code generation incompatibility errors, I’d like to ask whether I can "pull" a plot from the base Matlab workspace into Simulink when I run a Simulink function?
Say that I click on a specific block on Simulink that triggers a script in the base workspace to run, and then the results and plots from the base workspace script are "sent" to Simulink.
Is this achievable?
Thanks! I’m currently working with a rather length Matlab script, and am trying to move it onto simulink to adopt a more ‘drag n drop’ logic flow, as in Simulink we are able to use both custom function blocks as well as default lib blocks. After trying to move this script to Simulink I realized that I have been running into a lot of code generation incompatibility errors, I’d like to ask whether I can "pull" a plot from the base Matlab workspace into Simulink when I run a Simulink function?
Say that I click on a specific block on Simulink that triggers a script in the base workspace to run, and then the results and plots from the base workspace script are "sent" to Simulink.
Is this achievable?
Thanks! simulink, matlab code, code generation MATLAB Answers — New Questions
Keyboard remapping in live editor not working.
Hi guys,
I’m on a mac here and have remapped the begin and end keys to "begin line" and "end line" in matlab.
I have also removed these keys from "begin doc" and "end doc".
This works perfectly in the main editor and command windows but is totally ignored in the live editor where the original "begin doc" and "end doc" are still mapped to the keys.
Am I doing something wrong or is this a bug?
Thanks for any help
AndyHi guys,
I’m on a mac here and have remapped the begin and end keys to "begin line" and "end line" in matlab.
I have also removed these keys from "begin doc" and "end doc".
This works perfectly in the main editor and command windows but is totally ignored in the live editor where the original "begin doc" and "end doc" are still mapped to the keys.
Am I doing something wrong or is this a bug?
Thanks for any help
Andy Hi guys,
I’m on a mac here and have remapped the begin and end keys to "begin line" and "end line" in matlab.
I have also removed these keys from "begin doc" and "end doc".
This works perfectly in the main editor and command windows but is totally ignored in the live editor where the original "begin doc" and "end doc" are still mapped to the keys.
Am I doing something wrong or is this a bug?
Thanks for any help
Andy live editor, keyboard remapping MATLAB Answers — New Questions
optimization expression includes an integration
I am trying an optimization problem in which the expression of the objective function includes an integral.
It is obvious that the sigma equal to one results in the optimium solution. I want to use the optimization toolbox to get this result with an initial sigma equal to, say, 10.
I wrote the following code.
g1 = @(x,c) (exp(-(0.5*(x./c).^2))./sqrt(2*pi*c^2));
c = optimvar("c",1,1,’Type’,’continuous’,’LowerBound’,0.1,’UpperBound’,10);
prob = optimproblem(‘Objective’, (0.5 – integral(@(x)g1(x,c),0, 10)).^2);
[solf,fvalf,eflagf,outputf] = solve(prob)
The following error is generated.
Error using integralCalc>finalInputChecks (line 544)
Input function must return ‘double’ or ‘single’ values. Found
‘optim.problemdef.OptimizationExpression’.
I have two questions:
1, Am I coding the problem properly/correctly?
2, If the code is basically correct, how can I solve the error?
Thank you.I am trying an optimization problem in which the expression of the objective function includes an integral.
It is obvious that the sigma equal to one results in the optimium solution. I want to use the optimization toolbox to get this result with an initial sigma equal to, say, 10.
I wrote the following code.
g1 = @(x,c) (exp(-(0.5*(x./c).^2))./sqrt(2*pi*c^2));
c = optimvar("c",1,1,’Type’,’continuous’,’LowerBound’,0.1,’UpperBound’,10);
prob = optimproblem(‘Objective’, (0.5 – integral(@(x)g1(x,c),0, 10)).^2);
[solf,fvalf,eflagf,outputf] = solve(prob)
The following error is generated.
Error using integralCalc>finalInputChecks (line 544)
Input function must return ‘double’ or ‘single’ values. Found
‘optim.problemdef.OptimizationExpression’.
I have two questions:
1, Am I coding the problem properly/correctly?
2, If the code is basically correct, how can I solve the error?
Thank you. I am trying an optimization problem in which the expression of the objective function includes an integral.
It is obvious that the sigma equal to one results in the optimium solution. I want to use the optimization toolbox to get this result with an initial sigma equal to, say, 10.
I wrote the following code.
g1 = @(x,c) (exp(-(0.5*(x./c).^2))./sqrt(2*pi*c^2));
c = optimvar("c",1,1,’Type’,’continuous’,’LowerBound’,0.1,’UpperBound’,10);
prob = optimproblem(‘Objective’, (0.5 – integral(@(x)g1(x,c),0, 10)).^2);
[solf,fvalf,eflagf,outputf] = solve(prob)
The following error is generated.
Error using integralCalc>finalInputChecks (line 544)
Input function must return ‘double’ or ‘single’ values. Found
‘optim.problemdef.OptimizationExpression’.
I have two questions:
1, Am I coding the problem properly/correctly?
2, If the code is basically correct, how can I solve the error?
Thank you. #optimization #integral MATLAB Answers — New Questions
How to Graph integrals?
Hello everybody,
I have a little trouble here. I’m trying to graph the following auction at first price:
syms x a
gamma = 0.3;
b_hat= 0.542;
fun = b/2;
F(a) = int(fun, x, 0, a);
fplot(F,[0 1])
But I still can’t get it, I would appreciate it if you could help me.Hello everybody,
I have a little trouble here. I’m trying to graph the following auction at first price:
syms x a
gamma = 0.3;
b_hat= 0.542;
fun = b/2;
F(a) = int(fun, x, 0, a);
fplot(F,[0 1])
But I still can’t get it, I would appreciate it if you could help me. Hello everybody,
I have a little trouble here. I’m trying to graph the following auction at first price:
syms x a
gamma = 0.3;
b_hat= 0.542;
fun = b/2;
F(a) = int(fun, x, 0, a);
fplot(F,[0 1])
But I still can’t get it, I would appreciate it if you could help me. graph, integrals MATLAB Answers — New Questions
Connecting Xbox Controller to Simulink Real-Time
Hi,
Im trying to add a xbox controller to my simulink Real-Time. However the only blocks I could find and use only work for normal simulink. I tried using Gamepad Simulator block and the Joystick Input block and I tested and worked only for normal Simulink. When I try to use them in Simulink Real-Time, it doesnt take the values. When I use the the JoyStick input block in simulink real-time, it gives me an error and says "Error:Unable to find S-function module ‘joyinput’. S-function modules must exist as either source files or pre-compiled object files on the MATLAB path.".
Is there a way to get around this?
ThanksHi,
Im trying to add a xbox controller to my simulink Real-Time. However the only blocks I could find and use only work for normal simulink. I tried using Gamepad Simulator block and the Joystick Input block and I tested and worked only for normal Simulink. When I try to use them in Simulink Real-Time, it doesnt take the values. When I use the the JoyStick input block in simulink real-time, it gives me an error and says "Error:Unable to find S-function module ‘joyinput’. S-function modules must exist as either source files or pre-compiled object files on the MATLAB path.".
Is there a way to get around this?
Thanks Hi,
Im trying to add a xbox controller to my simulink Real-Time. However the only blocks I could find and use only work for normal simulink. I tried using Gamepad Simulator block and the Joystick Input block and I tested and worked only for normal Simulink. When I try to use them in Simulink Real-Time, it doesnt take the values. When I use the the JoyStick input block in simulink real-time, it gives me an error and says "Error:Unable to find S-function module ‘joyinput’. S-function modules must exist as either source files or pre-compiled object files on the MATLAB path.".
Is there a way to get around this?
Thanks simulink, simulink realtime MATLAB Answers — New Questions
contour plot problem Z must be at least a 2×2 matrix
Hallo everyone,
i have a problem to make the contour plot, it always shows Z must be at least a 2×2 matrix. i have try my best to solve, but it still not work, could you please to help me? The code is as follows.
x=[80;100;90;90;90]
y=[4;4;2;6;4]
[X,Y] = meshgrid(x,y)
% Polly 11 f(x,y)=p00+p10*x+p01*y
f1=1.7419-0.0006*x+0.0132*y
contour(X,Y,f1)
Thanks and best regards
JLHallo everyone,
i have a problem to make the contour plot, it always shows Z must be at least a 2×2 matrix. i have try my best to solve, but it still not work, could you please to help me? The code is as follows.
x=[80;100;90;90;90]
y=[4;4;2;6;4]
[X,Y] = meshgrid(x,y)
% Polly 11 f(x,y)=p00+p10*x+p01*y
f1=1.7419-0.0006*x+0.0132*y
contour(X,Y,f1)
Thanks and best regards
JL Hallo everyone,
i have a problem to make the contour plot, it always shows Z must be at least a 2×2 matrix. i have try my best to solve, but it still not work, could you please to help me? The code is as follows.
x=[80;100;90;90;90]
y=[4;4;2;6;4]
[X,Y] = meshgrid(x,y)
% Polly 11 f(x,y)=p00+p10*x+p01*y
f1=1.7419-0.0006*x+0.0132*y
contour(X,Y,f1)
Thanks and best regards
JL contour MATLAB Answers — New Questions