Tag Archives: matlab
Why am I unable to remove the MATLAB installation folder after uninstalling MATLAB?
After uninstalling MATLAB on Windows, I went to delete the remaining files. When I attempt to delete the remaining files, I get an error that the files are in use and I cannot delete them. How do I delete the remaining installation files?After uninstalling MATLAB on Windows, I went to delete the remaining files. When I attempt to delete the remaining files, I get an error that the files are in use and I cannot delete them. How do I delete the remaining installation files? After uninstalling MATLAB on Windows, I went to delete the remaining files. When I attempt to delete the remaining files, I get an error that the files are in use and I cannot delete them. How do I delete the remaining installation files? MATLAB Answers — New Questions
tcpclient objects are not supported by icdevice. Hardware interface object must be a serial, tcpip, visa, or gpib object.
I was using tcpip interface object with my matlab interface intrument driver. But, it was giving warining that tcpip will be removed in future release. So, to make my code work even in future I changed tcpip with tcpclient as suggested. But, it is not supported by icdevice. So how can I use my interface intrument driver with functions that are not going to be removed in near future. Also, can anyone suggest when this tcpip function will be removed fro Matlab? Please find below code snippet which is giving error. "tcpclient objects are not supported by icdevice. Hardware interface object must be a serial, tcpip, visa, or gpib object."
% Create a new TCP/IP client object.
interfaceObj = tcpclient(remoteHost, remotePort);
% Create a device object.
deviceObj = icdevice(‘my_driver.mdd’, interfaceObj);I was using tcpip interface object with my matlab interface intrument driver. But, it was giving warining that tcpip will be removed in future release. So, to make my code work even in future I changed tcpip with tcpclient as suggested. But, it is not supported by icdevice. So how can I use my interface intrument driver with functions that are not going to be removed in near future. Also, can anyone suggest when this tcpip function will be removed fro Matlab? Please find below code snippet which is giving error. "tcpclient objects are not supported by icdevice. Hardware interface object must be a serial, tcpip, visa, or gpib object."
% Create a new TCP/IP client object.
interfaceObj = tcpclient(remoteHost, remotePort);
% Create a device object.
deviceObj = icdevice(‘my_driver.mdd’, interfaceObj); I was using tcpip interface object with my matlab interface intrument driver. But, it was giving warining that tcpip will be removed in future release. So, to make my code work even in future I changed tcpip with tcpclient as suggested. But, it is not supported by icdevice. So how can I use my interface intrument driver with functions that are not going to be removed in near future. Also, can anyone suggest when this tcpip function will be removed fro Matlab? Please find below code snippet which is giving error. "tcpclient objects are not supported by icdevice. Hardware interface object must be a serial, tcpip, visa, or gpib object."
% Create a new TCP/IP client object.
interfaceObj = tcpclient(remoteHost, remotePort);
% Create a device object.
deviceObj = icdevice(‘my_driver.mdd’, interfaceObj); icdevice, tcpip, tcpclient, will be removed in near future MATLAB Answers — New Questions
Why do I get activation error 361 when performing a license update within MATLAB?
When performing a license update within MATLAB, I receive an error 361. How can I perform the license update for my MATLAB?When performing a license update within MATLAB, I receive an error 361. How can I perform the license update for my MATLAB? When performing a license update within MATLAB, I receive an error 361. How can I perform the license update for my MATLAB? MATLAB Answers — New Questions
After upgrading Win11, MATLAB garbled characters
After upgrading win11, open matlab2024a, all programs under one of the folder paths become garbled, not only Chinese comments, including all code; But there is no problem with other folders.
Have you encountered this kind of problem? Is there any workaround that can be tried?After upgrading win11, open matlab2024a, all programs under one of the folder paths become garbled, not only Chinese comments, including all code; But there is no problem with other folders.
Have you encountered this kind of problem? Is there any workaround that can be tried? After upgrading win11, open matlab2024a, all programs under one of the folder paths become garbled, not only Chinese comments, including all code; But there is no problem with other folders.
Have you encountered this kind of problem? Is there any workaround that can be tried? win11,matlab2024a, garbled MATLAB Answers — New Questions
How to megre meshgrid and stl file?
I can show my meshgrid and stl model. but can’t merge two thing…
I want the ship to belong to the meshgrid by value.
I can let you know if I need any information.I can show my meshgrid and stl model. but can’t merge two thing…
I want the ship to belong to the meshgrid by value.
I can let you know if I need any information. I can show my meshgrid and stl model. but can’t merge two thing…
I want the ship to belong to the meshgrid by value.
I can let you know if I need any information. stl, mesh, meshgrid, merge MATLAB Answers — New Questions
Different ways of joining empty strings produce different results
Here are different ways to join empty strings. One may expect the results to be the same, but in reality, they give 3 different kind of answers. What is the rationale behind it?
join00 = join(string.empty(0,0), "/"); % 0x1 string
join01 = join(string.empty(0,1), "/"); % <missing>
join10 = join(string.empty(1,0), "/"); % <missing>
strjoin00 = strjoin(string.empty(0,0), "/"); % ""
strjoin10 = strjoin(string.empty(1,0), "/"); % ""
strjoin01 = strjoin(string.empty(0,1), "/"); % ""
Background
In my application, multiple series of strings are joined. Sometimes though, certain series is empty, in which case I am tasked to detect those results and replace them with "N/A". Through trial and error, I found that I cannot simply detect those results with only isempty(result), ismissing(result), or (isstring(result) || ischar(result)) && strlength(result) == 0, but I need the combination of all of them, which makes me wonder if there is any reason behind the different behavior.Here are different ways to join empty strings. One may expect the results to be the same, but in reality, they give 3 different kind of answers. What is the rationale behind it?
join00 = join(string.empty(0,0), "/"); % 0x1 string
join01 = join(string.empty(0,1), "/"); % <missing>
join10 = join(string.empty(1,0), "/"); % <missing>
strjoin00 = strjoin(string.empty(0,0), "/"); % ""
strjoin10 = strjoin(string.empty(1,0), "/"); % ""
strjoin01 = strjoin(string.empty(0,1), "/"); % ""
Background
In my application, multiple series of strings are joined. Sometimes though, certain series is empty, in which case I am tasked to detect those results and replace them with "N/A". Through trial and error, I found that I cannot simply detect those results with only isempty(result), ismissing(result), or (isstring(result) || ischar(result)) && strlength(result) == 0, but I need the combination of all of them, which makes me wonder if there is any reason behind the different behavior. Here are different ways to join empty strings. One may expect the results to be the same, but in reality, they give 3 different kind of answers. What is the rationale behind it?
join00 = join(string.empty(0,0), "/"); % 0x1 string
join01 = join(string.empty(0,1), "/"); % <missing>
join10 = join(string.empty(1,0), "/"); % <missing>
strjoin00 = strjoin(string.empty(0,0), "/"); % ""
strjoin10 = strjoin(string.empty(1,0), "/"); % ""
strjoin01 = strjoin(string.empty(0,1), "/"); % ""
Background
In my application, multiple series of strings are joined. Sometimes though, certain series is empty, in which case I am tasked to detect those results and replace them with "N/A". Through trial and error, I found that I cannot simply detect those results with only isempty(result), ismissing(result), or (isstring(result) || ischar(result)) && strlength(result) == 0, but I need the combination of all of them, which makes me wonder if there is any reason behind the different behavior. join, strjoin, string, empty MATLAB Answers — New Questions
How do return the latex form by using method of ‘disp’ in Matlab class ?
I define the class in matlab as:
classdef Myclass
properties
Content
end
methods
function obj = Myclass(content)
obj.Content = content;
end
function disp(obj)
A = symmatrix(‘A(1/3,[0,0,1])’);
disp(A);
end
end
end
When we run this class in live editor return ‘A(1/3,[0,0,1])’ rather than latex form.
Myclass(1)
% return ‘A(1/3,[0,0,1])’
A = symmatrix(‘A(1/3,[0,0,1])’);
% return latrx form A(1/3,[0,0,1])I define the class in matlab as:
classdef Myclass
properties
Content
end
methods
function obj = Myclass(content)
obj.Content = content;
end
function disp(obj)
A = symmatrix(‘A(1/3,[0,0,1])’);
disp(A);
end
end
end
When we run this class in live editor return ‘A(1/3,[0,0,1])’ rather than latex form.
Myclass(1)
% return ‘A(1/3,[0,0,1])’
A = symmatrix(‘A(1/3,[0,0,1])’);
% return latrx form A(1/3,[0,0,1]) I define the class in matlab as:
classdef Myclass
properties
Content
end
methods
function obj = Myclass(content)
obj.Content = content;
end
function disp(obj)
A = symmatrix(‘A(1/3,[0,0,1])’);
disp(A);
end
end
end
When we run this class in live editor return ‘A(1/3,[0,0,1])’ rather than latex form.
Myclass(1)
% return ‘A(1/3,[0,0,1])’
A = symmatrix(‘A(1/3,[0,0,1])’);
% return latrx form A(1/3,[0,0,1]) latex, disp, classdef MATLAB Answers — New Questions
How do I create “Junction ID” & “Road ID” in RoadRunner?
I am using RoadRunner R2024a right now, and I want to assign road IDs to the roads I generate and junction IDs to the junctions.
If you look at the link below,
https://www.youtube.com/watch?v=RDF0rFmp3dQ
at 4:42, you can see junction IDs and road IDs in the attributes.
Even if I follow the video exactly, nothing appears in my attributes.
So I looked at the answer of other person who asked similar question.
It says I have to buy matlab and automated driving toolbox, but that costs too much money.
I just want to add something simple like an ID to the attributes.
Is there really no way other than buying matlab and the toolbox?I am using RoadRunner R2024a right now, and I want to assign road IDs to the roads I generate and junction IDs to the junctions.
If you look at the link below,
https://www.youtube.com/watch?v=RDF0rFmp3dQ
at 4:42, you can see junction IDs and road IDs in the attributes.
Even if I follow the video exactly, nothing appears in my attributes.
So I looked at the answer of other person who asked similar question.
It says I have to buy matlab and automated driving toolbox, but that costs too much money.
I just want to add something simple like an ID to the attributes.
Is there really no way other than buying matlab and the toolbox? I am using RoadRunner R2024a right now, and I want to assign road IDs to the roads I generate and junction IDs to the junctions.
If you look at the link below,
https://www.youtube.com/watch?v=RDF0rFmp3dQ
at 4:42, you can see junction IDs and road IDs in the attributes.
Even if I follow the video exactly, nothing appears in my attributes.
So I looked at the answer of other person who asked similar question.
It says I have to buy matlab and automated driving toolbox, but that costs too much money.
I just want to add something simple like an ID to the attributes.
Is there really no way other than buying matlab and the toolbox? id, junction id, road id, roadrunner, matlab, toolbox MATLAB Answers — New Questions
Possibility of dropdown from a toolbar button in app designer?
I’d like to create a dropdown menu from the upper toolbar of an app that im designing. This dropdown would be to select the color pallete of a figure in the app. Is it possible to have a dropdown menu appear from a toolbar button?I’d like to create a dropdown menu from the upper toolbar of an app that im designing. This dropdown would be to select the color pallete of a figure in the app. Is it possible to have a dropdown menu appear from a toolbar button? I’d like to create a dropdown menu from the upper toolbar of an app that im designing. This dropdown would be to select the color pallete of a figure in the app. Is it possible to have a dropdown menu appear from a toolbar button? toolbar, dropdown, app designer MATLAB Answers — New Questions
VideoReader Motion JPEG 2000 format does not work
R2024a VideoReader does not import .mj2 files correctly. When inspecting the frames they are blank. R2023b has no issues importing .mj2 files. Here’s the coded tested between both matlab verisons. Any suggestions for getting VideoReader working in 2024a?
% Get selected file
savelocation = "frames.mj2";
% Load frames
v = VideoReader(savelocation);
frames = read(v);
imagesc(frames(:,:,:,400))R2024a VideoReader does not import .mj2 files correctly. When inspecting the frames they are blank. R2023b has no issues importing .mj2 files. Here’s the coded tested between both matlab verisons. Any suggestions for getting VideoReader working in 2024a?
% Get selected file
savelocation = "frames.mj2";
% Load frames
v = VideoReader(savelocation);
frames = read(v);
imagesc(frames(:,:,:,400)) R2024a VideoReader does not import .mj2 files correctly. When inspecting the frames they are blank. R2023b has no issues importing .mj2 files. Here’s the coded tested between both matlab verisons. Any suggestions for getting VideoReader working in 2024a?
% Get selected file
savelocation = "frames.mj2";
% Load frames
v = VideoReader(savelocation);
frames = read(v);
imagesc(frames(:,:,:,400)) video processing, video, import MATLAB Answers — New Questions
Unable to start MATLAB 2022a after clicking on update, fatal startup error reported
I am a MATLAB user from China. Yesterday, I chose to update MATLAB 2022a, but this morning I opened my computer and found that MATLAB could no longer be opened. The error is as follows. May I ask if there are any engineers who can propose corresponding solutions? Thank you
“
Fatal Startup ErrorDynamic exception type: class cppmicroservicessharedlibraryexceptionstd:. what: Loading D: ProgramFiles\\ matlab startup pluginsopenssl initializeibmwconnectoropensslinitializer. dlifailed with error:找不到指定的模块not connected: not connected确定
“I am a MATLAB user from China. Yesterday, I chose to update MATLAB 2022a, but this morning I opened my computer and found that MATLAB could no longer be opened. The error is as follows. May I ask if there are any engineers who can propose corresponding solutions? Thank you
“
Fatal Startup ErrorDynamic exception type: class cppmicroservicessharedlibraryexceptionstd:. what: Loading D: ProgramFiles\\ matlab startup pluginsopenssl initializeibmwconnectoropensslinitializer. dlifailed with error:找不到指定的模块not connected: not connected确定
“ I am a MATLAB user from China. Yesterday, I chose to update MATLAB 2022a, but this morning I opened my computer and found that MATLAB could no longer be opened. The error is as follows. May I ask if there are any engineers who can propose corresponding solutions? Thank you
“
Fatal Startup ErrorDynamic exception type: class cppmicroservicessharedlibraryexceptionstd:. what: Loading D: ProgramFiles\\ matlab startup pluginsopenssl initializeibmwconnectoropensslinitializer. dlifailed with error:找不到指定的模块not connected: not connected确定
“ fatal startup error MATLAB Answers — New Questions
Order terms in symbolic poly converted to string
Is there a way to control the order of the terms in a symbolic polynomial that has been converted to string?
E.g. the following
syms x
T=taylor(exp(x),order=3);
string(T)
results in
ans = "x + x^2/2 + 1"
and I would rather have it as 1+x+x^2/2 or the reverse order. I’ll be putting this in the title of a plot so if there is some other way to automatically get the correct order in the title that would work equally as well.Is there a way to control the order of the terms in a symbolic polynomial that has been converted to string?
E.g. the following
syms x
T=taylor(exp(x),order=3);
string(T)
results in
ans = "x + x^2/2 + 1"
and I would rather have it as 1+x+x^2/2 or the reverse order. I’ll be putting this in the title of a plot so if there is some other way to automatically get the correct order in the title that would work equally as well. Is there a way to control the order of the terms in a symbolic polynomial that has been converted to string?
E.g. the following
syms x
T=taylor(exp(x),order=3);
string(T)
results in
ans = "x + x^2/2 + 1"
and I would rather have it as 1+x+x^2/2 or the reverse order. I’ll be putting this in the title of a plot so if there is some other way to automatically get the correct order in the title that would work equally as well. symbolic polynomials, order MATLAB Answers — New Questions
ROS rate in Simulink with standalone code generation
Hi everyone,
the following problem I have: I built a simulink model to generate a standalone ros node. It is a simple controller. I would like to publish the data with 10 hz, so I defined the sample time (by the blank message) 0.1.
After building the model and running the ROS-node, I test the publisher frequency with
rostopic hz ….
and I get 9.94, 9.95….
If I implement the same functionality in Python ROS-node, I get the desired 10 hz, so it must be some code generation issue and not the limitation of the target hardware.
Could you help me, how to have a more stable publishing rate in a generated Simulink ROS-node?
Thanks!Hi everyone,
the following problem I have: I built a simulink model to generate a standalone ros node. It is a simple controller. I would like to publish the data with 10 hz, so I defined the sample time (by the blank message) 0.1.
After building the model and running the ROS-node, I test the publisher frequency with
rostopic hz ….
and I get 9.94, 9.95….
If I implement the same functionality in Python ROS-node, I get the desired 10 hz, so it must be some code generation issue and not the limitation of the target hardware.
Could you help me, how to have a more stable publishing rate in a generated Simulink ROS-node?
Thanks! Hi everyone,
the following problem I have: I built a simulink model to generate a standalone ros node. It is a simple controller. I would like to publish the data with 10 hz, so I defined the sample time (by the blank message) 0.1.
After building the model and running the ROS-node, I test the publisher frequency with
rostopic hz ….
and I get 9.94, 9.95….
If I implement the same functionality in Python ROS-node, I get the desired 10 hz, so it must be some code generation issue and not the limitation of the target hardware.
Could you help me, how to have a more stable publishing rate in a generated Simulink ROS-node?
Thanks! ros, simulink MATLAB Answers — New Questions
Incorrect number or types of inputs or outputs for function vec.
cvx_begin
variable beam(K + 1, K) complex;
variable r_c(1, K);
variable R_p(1, K);
common_rate = sum(Group .* r_c);
rate = 0;
for i = 1 : K
upper_limit = R_p(i) + Group(i) .* r_c(i) – D_min(i);
rate = rate + (((theta * (1 – exp(- upper_limit * theta))) .* (upper_limit >= 0)) + upper_limit .* (upper_limit <= 0)) + D_min(i);
end
maximize(rate)
subject to
for i = 1 : K
g_private_i = Update_g_private_k(channel, beam, private_beta, alpha_private, Group, i, delt);
R_p(i) <= g_private_i;
0 <= R_p(i);
[R_c, ~] = Update_g_common_k(channel, beam, alpha_common, common_beta, Group, i, delt);
end
for j = 1 : K
0 <= r_c(j);
end
common_rate <= R_c;
% 功率约束
square_pos(norm(beam, ‘fro’)) <= P_max;
cvx_end
报错原因:
Incorrect number or types of inputs or outputs for function vec.
出错 cvx/sparsify>replcols (第 142 行)
cvx___.readonly( ndxs ) = vec( cvx_readlevel( bN ) );
出错 cvx/sparsify (第 61 行)
[ x, forms, repls ] = replcols( x, tt, ‘full’, forms, repls, isobj );
出错 cvx/exp (第 68 行)
xt = sparsify( xt, ‘exponential’ );
出错 Cvx_solver (第 49 行)
rate = rate + (((theta * (1 – exp(- upper_limit * theta))) .* (upper_limit >= 0)) + upper_limit .* (upper_limit <= 0)) + D_min(i);cvx_begin
variable beam(K + 1, K) complex;
variable r_c(1, K);
variable R_p(1, K);
common_rate = sum(Group .* r_c);
rate = 0;
for i = 1 : K
upper_limit = R_p(i) + Group(i) .* r_c(i) – D_min(i);
rate = rate + (((theta * (1 – exp(- upper_limit * theta))) .* (upper_limit >= 0)) + upper_limit .* (upper_limit <= 0)) + D_min(i);
end
maximize(rate)
subject to
for i = 1 : K
g_private_i = Update_g_private_k(channel, beam, private_beta, alpha_private, Group, i, delt);
R_p(i) <= g_private_i;
0 <= R_p(i);
[R_c, ~] = Update_g_common_k(channel, beam, alpha_common, common_beta, Group, i, delt);
end
for j = 1 : K
0 <= r_c(j);
end
common_rate <= R_c;
% 功率约束
square_pos(norm(beam, ‘fro’)) <= P_max;
cvx_end
报错原因:
Incorrect number or types of inputs or outputs for function vec.
出错 cvx/sparsify>replcols (第 142 行)
cvx___.readonly( ndxs ) = vec( cvx_readlevel( bN ) );
出错 cvx/sparsify (第 61 行)
[ x, forms, repls ] = replcols( x, tt, ‘full’, forms, repls, isobj );
出错 cvx/exp (第 68 行)
xt = sparsify( xt, ‘exponential’ );
出错 Cvx_solver (第 49 行)
rate = rate + (((theta * (1 – exp(- upper_limit * theta))) .* (upper_limit >= 0)) + upper_limit .* (upper_limit <= 0)) + D_min(i); cvx_begin
variable beam(K + 1, K) complex;
variable r_c(1, K);
variable R_p(1, K);
common_rate = sum(Group .* r_c);
rate = 0;
for i = 1 : K
upper_limit = R_p(i) + Group(i) .* r_c(i) – D_min(i);
rate = rate + (((theta * (1 – exp(- upper_limit * theta))) .* (upper_limit >= 0)) + upper_limit .* (upper_limit <= 0)) + D_min(i);
end
maximize(rate)
subject to
for i = 1 : K
g_private_i = Update_g_private_k(channel, beam, private_beta, alpha_private, Group, i, delt);
R_p(i) <= g_private_i;
0 <= R_p(i);
[R_c, ~] = Update_g_common_k(channel, beam, alpha_common, common_beta, Group, i, delt);
end
for j = 1 : K
0 <= r_c(j);
end
common_rate <= R_c;
% 功率约束
square_pos(norm(beam, ‘fro’)) <= P_max;
cvx_end
报错原因:
Incorrect number or types of inputs or outputs for function vec.
出错 cvx/sparsify>replcols (第 142 行)
cvx___.readonly( ndxs ) = vec( cvx_readlevel( bN ) );
出错 cvx/sparsify (第 61 行)
[ x, forms, repls ] = replcols( x, tt, ‘full’, forms, repls, isobj );
出错 cvx/exp (第 68 行)
xt = sparsify( xt, ‘exponential’ );
出错 Cvx_solver (第 49 行)
rate = rate + (((theta * (1 – exp(- upper_limit * theta))) .* (upper_limit >= 0)) + upper_limit .* (upper_limit <= 0)) + D_min(i); cvx求解凸优化问题 MATLAB Answers — New Questions
Simulink External Mode not working for TI F280049C “Error occurred while executing External Mode MEX-file ‘ext_comm'”
I am currently trying to run a simulation via simulink but I am having trouble getting the monitor and tune to work, when simulate I get this error Error occurred while executing External Mode MEX-file ‘ext_comm’: Failed to connect to the target. A time-out occurred while waiting for the connection response from the target. Possible reasons for the time-out: a) The target is not switched on. b) The target is not connected to your host machine. c) The application for the model is not running on the target. You might have clicked the Stop button. If the Run button is not dimmed, click it. Otherwise, click the Build button, which downloads and runs your application on the target.
The program is able to build but and load onto the board but getting it to run via monitor and tune does not work
So far I have tried
Changing the UART serial port in hardware implementation to the port other than the Auxiallary port
Changing the OSCCART frequency from 20MHZ to 10Mhz (also tried 25MHz)
Uninstalling and reinstalling the XDS110 drivers
Closed CCS
Changed SCI_A to alternate ports
whats funny is that when i changed the UART ports yesterday it technically "ran" as in it said it was running and didnt give any errors, but the simulation stayed at T=0.00 no matter how long i left it running. but now today it just doesnt work period.
I will include a bunch of relevant screenshots, i also followed this post which had similar issues already but nothing works still
Simulink External Mode not working on Texas Instruments C2000 Launchpad F28377S – MATLAB Answers – MATLAB Central (mathworks.com)I am currently trying to run a simulation via simulink but I am having trouble getting the monitor and tune to work, when simulate I get this error Error occurred while executing External Mode MEX-file ‘ext_comm’: Failed to connect to the target. A time-out occurred while waiting for the connection response from the target. Possible reasons for the time-out: a) The target is not switched on. b) The target is not connected to your host machine. c) The application for the model is not running on the target. You might have clicked the Stop button. If the Run button is not dimmed, click it. Otherwise, click the Build button, which downloads and runs your application on the target.
The program is able to build but and load onto the board but getting it to run via monitor and tune does not work
So far I have tried
Changing the UART serial port in hardware implementation to the port other than the Auxiallary port
Changing the OSCCART frequency from 20MHZ to 10Mhz (also tried 25MHz)
Uninstalling and reinstalling the XDS110 drivers
Closed CCS
Changed SCI_A to alternate ports
whats funny is that when i changed the UART ports yesterday it technically "ran" as in it said it was running and didnt give any errors, but the simulation stayed at T=0.00 no matter how long i left it running. but now today it just doesnt work period.
I will include a bunch of relevant screenshots, i also followed this post which had similar issues already but nothing works still
Simulink External Mode not working on Texas Instruments C2000 Launchpad F28377S – MATLAB Answers – MATLAB Central (mathworks.com) I am currently trying to run a simulation via simulink but I am having trouble getting the monitor and tune to work, when simulate I get this error Error occurred while executing External Mode MEX-file ‘ext_comm’: Failed to connect to the target. A time-out occurred while waiting for the connection response from the target. Possible reasons for the time-out: a) The target is not switched on. b) The target is not connected to your host machine. c) The application for the model is not running on the target. You might have clicked the Stop button. If the Run button is not dimmed, click it. Otherwise, click the Build button, which downloads and runs your application on the target.
The program is able to build but and load onto the board but getting it to run via monitor and tune does not work
So far I have tried
Changing the UART serial port in hardware implementation to the port other than the Auxiallary port
Changing the OSCCART frequency from 20MHZ to 10Mhz (also tried 25MHz)
Uninstalling and reinstalling the XDS110 drivers
Closed CCS
Changed SCI_A to alternate ports
whats funny is that when i changed the UART ports yesterday it technically "ran" as in it said it was running and didnt give any errors, but the simulation stayed at T=0.00 no matter how long i left it running. but now today it just doesnt work period.
I will include a bunch of relevant screenshots, i also followed this post which had similar issues already but nothing works still
Simulink External Mode not working on Texas Instruments C2000 Launchpad F28377S – MATLAB Answers – MATLAB Central (mathworks.com) simulink, f280049c, monitor tune, debug, simulation MATLAB Answers — New Questions
Use Vehicle Network Toolbox with multiple CAN databases on a single CAN bus
I’m using Vehicle Network Toolbox (VNT) to itneract with a CAN bus using database files (.dbc files). I’ve got it working with the code below.
chanA = canChannel(‘Kvaser’, ‘Leaf Light v2 1’, 1);
chanA.Database = canDatabase(‘OperatorControl.dbc’);
That works fine, but now I want to interact with messages that are defined in different databases, but are on the same CAN bus. What is the best way to do that? Should I define a new CAN channel? I could do that, but it seems like it would become cumbersome if there are a lot of extra channels to deal with.
Can I combine multiple CAN databases into a single one before adding it to the CAN channel? Can I add more than one database to the CAN channel? I haven’t been able to find a way to do that.
Thank you.I’m using Vehicle Network Toolbox (VNT) to itneract with a CAN bus using database files (.dbc files). I’ve got it working with the code below.
chanA = canChannel(‘Kvaser’, ‘Leaf Light v2 1’, 1);
chanA.Database = canDatabase(‘OperatorControl.dbc’);
That works fine, but now I want to interact with messages that are defined in different databases, but are on the same CAN bus. What is the best way to do that? Should I define a new CAN channel? I could do that, but it seems like it would become cumbersome if there are a lot of extra channels to deal with.
Can I combine multiple CAN databases into a single one before adding it to the CAN channel? Can I add more than one database to the CAN channel? I haven’t been able to find a way to do that.
Thank you. I’m using Vehicle Network Toolbox (VNT) to itneract with a CAN bus using database files (.dbc files). I’ve got it working with the code below.
chanA = canChannel(‘Kvaser’, ‘Leaf Light v2 1’, 1);
chanA.Database = canDatabase(‘OperatorControl.dbc’);
That works fine, but now I want to interact with messages that are defined in different databases, but are on the same CAN bus. What is the best way to do that? Should I define a new CAN channel? I could do that, but it seems like it would become cumbersome if there are a lot of extra channels to deal with.
Can I combine multiple CAN databases into a single one before adding it to the CAN channel? Can I add more than one database to the CAN channel? I haven’t been able to find a way to do that.
Thank you. vehicle network toolbox, vnt, can, canbus, can database, dbc MATLAB Answers — New Questions
Webcam with App Designer
Hi everyone!
I have an app that I have created in app designer in which I use the use of the web camera … when I want to do packaging it marks an error and loads me the following files:
Utility.p
webcam.m
webcaDataUtilityHelper.p
And the warning says : p-files cannot de analized for dependent filesHi everyone!
I have an app that I have created in app designer in which I use the use of the web camera … when I want to do packaging it marks an error and loads me the following files:
Utility.p
webcam.m
webcaDataUtilityHelper.p
And the warning says : p-files cannot de analized for dependent files Hi everyone!
I have an app that I have created in app designer in which I use the use of the web camera … when I want to do packaging it marks an error and loads me the following files:
Utility.p
webcam.m
webcaDataUtilityHelper.p
And the warning says : p-files cannot de analized for dependent files webcam appdesigner MATLAB Answers — New Questions
how to use GPU to run idNeuralStateSpace
Hi everyone,
I am trying to use Neural state space model to identify the state derivatives using only measurement data. The system that I use requires small sampling time which leads to the requirement of large training data. I want to use GPU while estimating nonlinear state-space model using the built-in function nlssest and idNeuralStateSpace. Do you mind letting me know how I can utilize the GPU while running the model?
Thank you.Hi everyone,
I am trying to use Neural state space model to identify the state derivatives using only measurement data. The system that I use requires small sampling time which leads to the requirement of large training data. I want to use GPU while estimating nonlinear state-space model using the built-in function nlssest and idNeuralStateSpace. Do you mind letting me know how I can utilize the GPU while running the model?
Thank you. Hi everyone,
I am trying to use Neural state space model to identify the state derivatives using only measurement data. The system that I use requires small sampling time which leads to the requirement of large training data. I want to use GPU while estimating nonlinear state-space model using the built-in function nlssest and idNeuralStateSpace. Do you mind letting me know how I can utilize the GPU while running the model?
Thank you. neural network, neural state space, idneuralstatespace, nlssest, deep learning MATLAB Answers — New Questions
agrupacion de datos de una tabla
Holas,
tengo una tabla ‘tData’ de tamano: 152709×14, que resume senal de varias variables de un instrumento de medicion (FTIR) y quisiera disminuir el ruido agrupando los valores de la senial en grupos de a 10 es decir obtener una nueva tabla ‘tDataReduced’ de un tamano 15270×14. la tabla tData cuenta con una columna de texto con el nombre de cada serie de medicion llamada ‘MeasID’, una columna de fecha y hora llamada ‘Time’ y 12 columnas con valores numericos.
Para este proposito, Estoy usando este codigo:
% (1) Crear un vector de índices para agrupar las filas en grupos de 10
indices = repelem(1:ceil(height(tData)/10), 10, 1);
indices = indices(1:height(tData));
% (2) Calcular el promedio de cada grupo de 10 filas
tDataReduced = grpstats(tData, indices, ‘mean’);
% (3) Eliminar la columna de índices generada por grpstats
tDataReduced(:, ‘GroupCount’) = [];
%%%%%%%%%%%%%%%%%%%5
Pero se tranca en el paso (2) indicando este error:
%*****************
Index exceeds the number of array elements. Index must not exceed 14.
Error in dsgrpstats (line 97)
[group,glabel,groupname] = mgrp2idx(a_data(groupvars),a_nobs);
Error in grpstats (line 144)
[varargout{1:nargout}] = dsgrpstats(x,group,whichstats,varargin{:});
%******************
Algunba idea que me pueda ayudar?Holas,
tengo una tabla ‘tData’ de tamano: 152709×14, que resume senal de varias variables de un instrumento de medicion (FTIR) y quisiera disminuir el ruido agrupando los valores de la senial en grupos de a 10 es decir obtener una nueva tabla ‘tDataReduced’ de un tamano 15270×14. la tabla tData cuenta con una columna de texto con el nombre de cada serie de medicion llamada ‘MeasID’, una columna de fecha y hora llamada ‘Time’ y 12 columnas con valores numericos.
Para este proposito, Estoy usando este codigo:
% (1) Crear un vector de índices para agrupar las filas en grupos de 10
indices = repelem(1:ceil(height(tData)/10), 10, 1);
indices = indices(1:height(tData));
% (2) Calcular el promedio de cada grupo de 10 filas
tDataReduced = grpstats(tData, indices, ‘mean’);
% (3) Eliminar la columna de índices generada por grpstats
tDataReduced(:, ‘GroupCount’) = [];
%%%%%%%%%%%%%%%%%%%5
Pero se tranca en el paso (2) indicando este error:
%*****************
Index exceeds the number of array elements. Index must not exceed 14.
Error in dsgrpstats (line 97)
[group,glabel,groupname] = mgrp2idx(a_data(groupvars),a_nobs);
Error in grpstats (line 144)
[varargout{1:nargout}] = dsgrpstats(x,group,whichstats,varargin{:});
%******************
Algunba idea que me pueda ayudar? Holas,
tengo una tabla ‘tData’ de tamano: 152709×14, que resume senal de varias variables de un instrumento de medicion (FTIR) y quisiera disminuir el ruido agrupando los valores de la senial en grupos de a 10 es decir obtener una nueva tabla ‘tDataReduced’ de un tamano 15270×14. la tabla tData cuenta con una columna de texto con el nombre de cada serie de medicion llamada ‘MeasID’, una columna de fecha y hora llamada ‘Time’ y 12 columnas con valores numericos.
Para este proposito, Estoy usando este codigo:
% (1) Crear un vector de índices para agrupar las filas en grupos de 10
indices = repelem(1:ceil(height(tData)/10), 10, 1);
indices = indices(1:height(tData));
% (2) Calcular el promedio de cada grupo de 10 filas
tDataReduced = grpstats(tData, indices, ‘mean’);
% (3) Eliminar la columna de índices generada por grpstats
tDataReduced(:, ‘GroupCount’) = [];
%%%%%%%%%%%%%%%%%%%5
Pero se tranca en el paso (2) indicando este error:
%*****************
Index exceeds the number of array elements. Index must not exceed 14.
Error in dsgrpstats (line 97)
[group,glabel,groupname] = mgrp2idx(a_data(groupvars),a_nobs);
Error in grpstats (line 144)
[varargout{1:nargout}] = dsgrpstats(x,group,whichstats,varargin{:});
%******************
Algunba idea que me pueda ayudar? statistics, table, grpstats, filter, signal processing MATLAB Answers — New Questions
stl to grid error
I tired to use above code to make grid [xgridvector,ygridvector,zheights] use for simscape grid surface.
when I use ‘terrain.stl’, it works well. But when I use ‘untitle.stl’ the resault shows like this. please help me T_T..
%%code starts here
[stlData, ~] = stlread(‘untitled.stl’);
vertices = stlData.vertices;
% %
[uniqueVertices, ~, ic] = unique(vertices(:, 1:2), ‘rows’);
averageZ = accumarray(ic, vertices(:, 3), [], @mean);
vertices = [uniqueVertices, averageZ];
xGridVector = linspace(min(vertices(:,1)), max(vertices(:,1)), 100);
yGridVector = linspace(min(vertices(:,2)), max(vertices(:,2)), 100);
[X, Y] = ndgrid(xGridVector, yGridVector);
F = scatteredInterpolant(vertices(:,1), vertices(:,2), vertices(:,3), ‘linear’, ‘none’);
ZHeights = F(X, Y);
ZHeights(isnan(ZHeights)) = min(vertices(:,3));
figure;
surf(X, Y, ZHeights);
title(‘Grid Surface from STL File’);
xlabel(‘X (meters)’);
ylabel(‘Y (meters)’);
zlabel(‘Z (meters)’);
grid on;
function [stlData, units] = stlread(filename)
fid = fopen(filename, ‘r’);
if fid == -1
error(‘File could not be opened, check name or path.’)
end
M = fread(fid, inf, ‘uint8=>uint8’);
fclose(fid);
[pathstr, name, ext] = fileparts(filename);
if strcmpi(ext, ‘.stl’) ~= 1
error(‘Filename must have a .stl extension’);
end
if isempty(M)
error(‘File is empty.’);
end
M = char(M’);
if (strncmp(M, ‘solid’, 5))
[stlData.vertices, stlData.faces, units] = stlReadAscii(filename);
else
[stlData.vertices, stlData.faces, units] = stlReadBinary(filename);
end
end
% ASCII 형식 STL 파일 읽기 (단순화된 예시)
function [vertices, faces, units] = stlReadAscii(filename)
fid = fopen(filename, ‘r’);
vertices = [];
while ~feof(fid)
line = fgetl(fid);
if startsWith(line, ‘vertex’)
vertex = sscanf(line, ‘vertex %f %f %f’);
vertices = [vertices; vertex’];
end
end
fclose(fid);
faces = reshape(1:size(vertices, 1), 3, [])’;
units = ‘mm’;
end
% Binary 형식 STL 파일 읽기 (단순화된 예시)
function [vertices, faces, units] = stlReadBinary(filename)
fid = fopen(filename, ‘rb’);
fseek(fid, 80, ‘bof’);
numFaces = fread(fid, 1, ‘uint32’);
faces = zeros(numFaces, 3);
vertices = zeros(numFaces*3, 3);
for i = 1:numFaces
fread(fid, 3, ‘float32’);
vertices((i-1)*3+1:i*3, 🙂 = fread(fid, [3, 3], ‘float32′)’;
fread(fid, 1, ‘uint16’);
faces(i, 🙂 = (i-1)*3+1:i*3;
end
fclose(fid);
units = ‘mm’;
endI tired to use above code to make grid [xgridvector,ygridvector,zheights] use for simscape grid surface.
when I use ‘terrain.stl’, it works well. But when I use ‘untitle.stl’ the resault shows like this. please help me T_T..
%%code starts here
[stlData, ~] = stlread(‘untitled.stl’);
vertices = stlData.vertices;
% %
[uniqueVertices, ~, ic] = unique(vertices(:, 1:2), ‘rows’);
averageZ = accumarray(ic, vertices(:, 3), [], @mean);
vertices = [uniqueVertices, averageZ];
xGridVector = linspace(min(vertices(:,1)), max(vertices(:,1)), 100);
yGridVector = linspace(min(vertices(:,2)), max(vertices(:,2)), 100);
[X, Y] = ndgrid(xGridVector, yGridVector);
F = scatteredInterpolant(vertices(:,1), vertices(:,2), vertices(:,3), ‘linear’, ‘none’);
ZHeights = F(X, Y);
ZHeights(isnan(ZHeights)) = min(vertices(:,3));
figure;
surf(X, Y, ZHeights);
title(‘Grid Surface from STL File’);
xlabel(‘X (meters)’);
ylabel(‘Y (meters)’);
zlabel(‘Z (meters)’);
grid on;
function [stlData, units] = stlread(filename)
fid = fopen(filename, ‘r’);
if fid == -1
error(‘File could not be opened, check name or path.’)
end
M = fread(fid, inf, ‘uint8=>uint8’);
fclose(fid);
[pathstr, name, ext] = fileparts(filename);
if strcmpi(ext, ‘.stl’) ~= 1
error(‘Filename must have a .stl extension’);
end
if isempty(M)
error(‘File is empty.’);
end
M = char(M’);
if (strncmp(M, ‘solid’, 5))
[stlData.vertices, stlData.faces, units] = stlReadAscii(filename);
else
[stlData.vertices, stlData.faces, units] = stlReadBinary(filename);
end
end
% ASCII 형식 STL 파일 읽기 (단순화된 예시)
function [vertices, faces, units] = stlReadAscii(filename)
fid = fopen(filename, ‘r’);
vertices = [];
while ~feof(fid)
line = fgetl(fid);
if startsWith(line, ‘vertex’)
vertex = sscanf(line, ‘vertex %f %f %f’);
vertices = [vertices; vertex’];
end
end
fclose(fid);
faces = reshape(1:size(vertices, 1), 3, [])’;
units = ‘mm’;
end
% Binary 형식 STL 파일 읽기 (단순화된 예시)
function [vertices, faces, units] = stlReadBinary(filename)
fid = fopen(filename, ‘rb’);
fseek(fid, 80, ‘bof’);
numFaces = fread(fid, 1, ‘uint32’);
faces = zeros(numFaces, 3);
vertices = zeros(numFaces*3, 3);
for i = 1:numFaces
fread(fid, 3, ‘float32’);
vertices((i-1)*3+1:i*3, 🙂 = fread(fid, [3, 3], ‘float32′)’;
fread(fid, 1, ‘uint16’);
faces(i, 🙂 = (i-1)*3+1:i*3;
end
fclose(fid);
units = ‘mm’;
end I tired to use above code to make grid [xgridvector,ygridvector,zheights] use for simscape grid surface.
when I use ‘terrain.stl’, it works well. But when I use ‘untitle.stl’ the resault shows like this. please help me T_T..
%%code starts here
[stlData, ~] = stlread(‘untitled.stl’);
vertices = stlData.vertices;
% %
[uniqueVertices, ~, ic] = unique(vertices(:, 1:2), ‘rows’);
averageZ = accumarray(ic, vertices(:, 3), [], @mean);
vertices = [uniqueVertices, averageZ];
xGridVector = linspace(min(vertices(:,1)), max(vertices(:,1)), 100);
yGridVector = linspace(min(vertices(:,2)), max(vertices(:,2)), 100);
[X, Y] = ndgrid(xGridVector, yGridVector);
F = scatteredInterpolant(vertices(:,1), vertices(:,2), vertices(:,3), ‘linear’, ‘none’);
ZHeights = F(X, Y);
ZHeights(isnan(ZHeights)) = min(vertices(:,3));
figure;
surf(X, Y, ZHeights);
title(‘Grid Surface from STL File’);
xlabel(‘X (meters)’);
ylabel(‘Y (meters)’);
zlabel(‘Z (meters)’);
grid on;
function [stlData, units] = stlread(filename)
fid = fopen(filename, ‘r’);
if fid == -1
error(‘File could not be opened, check name or path.’)
end
M = fread(fid, inf, ‘uint8=>uint8’);
fclose(fid);
[pathstr, name, ext] = fileparts(filename);
if strcmpi(ext, ‘.stl’) ~= 1
error(‘Filename must have a .stl extension’);
end
if isempty(M)
error(‘File is empty.’);
end
M = char(M’);
if (strncmp(M, ‘solid’, 5))
[stlData.vertices, stlData.faces, units] = stlReadAscii(filename);
else
[stlData.vertices, stlData.faces, units] = stlReadBinary(filename);
end
end
% ASCII 형식 STL 파일 읽기 (단순화된 예시)
function [vertices, faces, units] = stlReadAscii(filename)
fid = fopen(filename, ‘r’);
vertices = [];
while ~feof(fid)
line = fgetl(fid);
if startsWith(line, ‘vertex’)
vertex = sscanf(line, ‘vertex %f %f %f’);
vertices = [vertices; vertex’];
end
end
fclose(fid);
faces = reshape(1:size(vertices, 1), 3, [])’;
units = ‘mm’;
end
% Binary 형식 STL 파일 읽기 (단순화된 예시)
function [vertices, faces, units] = stlReadBinary(filename)
fid = fopen(filename, ‘rb’);
fseek(fid, 80, ‘bof’);
numFaces = fread(fid, 1, ‘uint32’);
faces = zeros(numFaces, 3);
vertices = zeros(numFaces*3, 3);
for i = 1:numFaces
fread(fid, 3, ‘float32’);
vertices((i-1)*3+1:i*3, 🙂 = fread(fid, [3, 3], ‘float32′)’;
fread(fid, 1, ‘uint16’);
faces(i, 🙂 = (i-1)*3+1:i*3;
end
fclose(fid);
units = ‘mm’;
end stl, grid, error, export MATLAB Answers — New Questions