Tag Archives: matlab
Can not run Matlab, uninstall, or reinstall on windows. Error in description.
Post Content Post Content procedure entry point error MATLAB Answers — New Questions
Is it possible to procedurally remove things from an engineering drawing?
I have been working on a post processing software for a few months for a robotics system my company makes. It does a lot of different things and is now being rolled out to our customers for use, which is exciting for me. My company makes a few different types of robots, one of them is very different than the others. To give a bit of context before getting to my question:
One of our robots does hull cleaning and inspection autonomously. When the vehicle is attached to a hull, the coordinate system is now relative to the ship, meaning the heading of the vehicle is relative to the Bow where 0 degrees is pointing towards the bow, 180 is pointed stern. "Latitude" is relative to the bottom where 0 degrees is at the keel and 90 degrees is at the waterline. "Longitude" is the distance from the centerline of the ship, where 180 is at the bow, and -180 is at the stern. Its a weird system but it doesnt matter where we are in the world, it only matters where we are on the ship.
Im trying to improve my app to work with this other robotics system, for all of our other robots we use a regular coordinate system with regular lat and long. When the user plots the data it does so over a satellite basemap, it looks great. When a user of our hull cleaning robot plots the data we typically do it over a 2D "folded out" image of the ship. Right now we have to do this by hand and its time consuming. The customer, who ever is hiring us to clean their ship, will provide us with an engineering drawing of the vessel, but there is a lot of stuff in the document we dont want to be included in the final product. Usually our operators use MS Paint or Adobe Illustrator to remove all the extra stuff, and they are left with a profile of the port, starboard, and top down veiw of the vessel, then we put it in QGIS and plot the points on top. Following this we take a screenshot and edit everything for a final product. Its time consuming and exhausting.
So heres my question. How can I get matlab to remove all the extra stuff for me? The two images I attached is what the engineering drawings typically look like vs what we use for our final product. I have the imaging processing toolbox and im trying to find a way to remove the extra stuff. the problem is its always a little different, sometimes the ships are much bigger than others. Any help or advice would be very much appreciated!I have been working on a post processing software for a few months for a robotics system my company makes. It does a lot of different things and is now being rolled out to our customers for use, which is exciting for me. My company makes a few different types of robots, one of them is very different than the others. To give a bit of context before getting to my question:
One of our robots does hull cleaning and inspection autonomously. When the vehicle is attached to a hull, the coordinate system is now relative to the ship, meaning the heading of the vehicle is relative to the Bow where 0 degrees is pointing towards the bow, 180 is pointed stern. "Latitude" is relative to the bottom where 0 degrees is at the keel and 90 degrees is at the waterline. "Longitude" is the distance from the centerline of the ship, where 180 is at the bow, and -180 is at the stern. Its a weird system but it doesnt matter where we are in the world, it only matters where we are on the ship.
Im trying to improve my app to work with this other robotics system, for all of our other robots we use a regular coordinate system with regular lat and long. When the user plots the data it does so over a satellite basemap, it looks great. When a user of our hull cleaning robot plots the data we typically do it over a 2D "folded out" image of the ship. Right now we have to do this by hand and its time consuming. The customer, who ever is hiring us to clean their ship, will provide us with an engineering drawing of the vessel, but there is a lot of stuff in the document we dont want to be included in the final product. Usually our operators use MS Paint or Adobe Illustrator to remove all the extra stuff, and they are left with a profile of the port, starboard, and top down veiw of the vessel, then we put it in QGIS and plot the points on top. Following this we take a screenshot and edit everything for a final product. Its time consuming and exhausting.
So heres my question. How can I get matlab to remove all the extra stuff for me? The two images I attached is what the engineering drawings typically look like vs what we use for our final product. I have the imaging processing toolbox and im trying to find a way to remove the extra stuff. the problem is its always a little different, sometimes the ships are much bigger than others. Any help or advice would be very much appreciated! I have been working on a post processing software for a few months for a robotics system my company makes. It does a lot of different things and is now being rolled out to our customers for use, which is exciting for me. My company makes a few different types of robots, one of them is very different than the others. To give a bit of context before getting to my question:
One of our robots does hull cleaning and inspection autonomously. When the vehicle is attached to a hull, the coordinate system is now relative to the ship, meaning the heading of the vehicle is relative to the Bow where 0 degrees is pointing towards the bow, 180 is pointed stern. "Latitude" is relative to the bottom where 0 degrees is at the keel and 90 degrees is at the waterline. "Longitude" is the distance from the centerline of the ship, where 180 is at the bow, and -180 is at the stern. Its a weird system but it doesnt matter where we are in the world, it only matters where we are on the ship.
Im trying to improve my app to work with this other robotics system, for all of our other robots we use a regular coordinate system with regular lat and long. When the user plots the data it does so over a satellite basemap, it looks great. When a user of our hull cleaning robot plots the data we typically do it over a 2D "folded out" image of the ship. Right now we have to do this by hand and its time consuming. The customer, who ever is hiring us to clean their ship, will provide us with an engineering drawing of the vessel, but there is a lot of stuff in the document we dont want to be included in the final product. Usually our operators use MS Paint or Adobe Illustrator to remove all the extra stuff, and they are left with a profile of the port, starboard, and top down veiw of the vessel, then we put it in QGIS and plot the points on top. Following this we take a screenshot and edit everything for a final product. Its time consuming and exhausting.
So heres my question. How can I get matlab to remove all the extra stuff for me? The two images I attached is what the engineering drawings typically look like vs what we use for our final product. I have the imaging processing toolbox and im trying to find a way to remove the extra stuff. the problem is its always a little different, sometimes the ships are much bigger than others. Any help or advice would be very much appreciated! image processing MATLAB Answers — New Questions
why audioDeviceWriter doesn’t list my output device?
Hello MATLAB comunity,
I’m trying to send audio over a USB Audio Class 2.0 (UAC2) implementation that enables the EV‑SC594‑EZKIT from ADI. The USB UAC2 device supports 16 inputs / 16 outputs at 16‑bit. MATLAB’s audioDeviceReader lists the device and I can capture the audio properly:
>> deviceReader = audioDeviceReader(Driver="DirectSound"); InDevices=getAudioDevices(deviceReader)
InDevices =
1×4 cell array
{‘Default’} {‘Primary Sound Capture Driver’} {‘Microphone Array on Monitor (2- Intel® Smart Sound Techno…’} {‘Microphone (EV-SC594 (16x16x16bit))’}
However the audioDeviceWritter does not show the device:
>> deviceWritter = audioDeviceWriter(Driver="DirectSound"); OutDevices=getAudioDevices(deviceWritter)
OutDevices =
1×4 cell array
{‘Default’} {‘Primary Sound Driver’} {‘Altavoces Laptop (2- Realtek(R) Audio)’} {‘Altavoces (office)’}
In Windows, the playback device is listed correctly, and I can run the Test on Sound Playback window confirming each of the 16 streams in the EV‑SC594‑EZKIT and also using audioDeviceReader in simulink.
The output device is listed as ‘WASAPI’
>> deviceWritter = audioDeviceWriter(Driver="WASAPI"); OutDevices=getAudioDevices(deviceWritter)
OutDevices =
1×4 cell array
{‘Default’} {‘SC594 (EV-SC594 (16x16x16bit))’} {‘Altavoces Laptop (2- Realtek(R) Audio)’} {‘Altavoces (office)’}
But I am having next error:
Error:Error in ‘AudioAnalyzerSL/Audio Device
Writer’: PortAudio Error: Invalid sample rate
Is there any way I can use to send audio to that USB Audio Class 2.0 port?
Thanks,
GilbertoHello MATLAB comunity,
I’m trying to send audio over a USB Audio Class 2.0 (UAC2) implementation that enables the EV‑SC594‑EZKIT from ADI. The USB UAC2 device supports 16 inputs / 16 outputs at 16‑bit. MATLAB’s audioDeviceReader lists the device and I can capture the audio properly:
>> deviceReader = audioDeviceReader(Driver="DirectSound"); InDevices=getAudioDevices(deviceReader)
InDevices =
1×4 cell array
{‘Default’} {‘Primary Sound Capture Driver’} {‘Microphone Array on Monitor (2- Intel® Smart Sound Techno…’} {‘Microphone (EV-SC594 (16x16x16bit))’}
However the audioDeviceWritter does not show the device:
>> deviceWritter = audioDeviceWriter(Driver="DirectSound"); OutDevices=getAudioDevices(deviceWritter)
OutDevices =
1×4 cell array
{‘Default’} {‘Primary Sound Driver’} {‘Altavoces Laptop (2- Realtek(R) Audio)’} {‘Altavoces (office)’}
In Windows, the playback device is listed correctly, and I can run the Test on Sound Playback window confirming each of the 16 streams in the EV‑SC594‑EZKIT and also using audioDeviceReader in simulink.
The output device is listed as ‘WASAPI’
>> deviceWritter = audioDeviceWriter(Driver="WASAPI"); OutDevices=getAudioDevices(deviceWritter)
OutDevices =
1×4 cell array
{‘Default’} {‘SC594 (EV-SC594 (16x16x16bit))’} {‘Altavoces Laptop (2- Realtek(R) Audio)’} {‘Altavoces (office)’}
But I am having next error:
Error:Error in ‘AudioAnalyzerSL/Audio Device
Writer’: PortAudio Error: Invalid sample rate
Is there any way I can use to send audio to that USB Audio Class 2.0 port?
Thanks,
Gilberto Hello MATLAB comunity,
I’m trying to send audio over a USB Audio Class 2.0 (UAC2) implementation that enables the EV‑SC594‑EZKIT from ADI. The USB UAC2 device supports 16 inputs / 16 outputs at 16‑bit. MATLAB’s audioDeviceReader lists the device and I can capture the audio properly:
>> deviceReader = audioDeviceReader(Driver="DirectSound"); InDevices=getAudioDevices(deviceReader)
InDevices =
1×4 cell array
{‘Default’} {‘Primary Sound Capture Driver’} {‘Microphone Array on Monitor (2- Intel® Smart Sound Techno…’} {‘Microphone (EV-SC594 (16x16x16bit))’}
However the audioDeviceWritter does not show the device:
>> deviceWritter = audioDeviceWriter(Driver="DirectSound"); OutDevices=getAudioDevices(deviceWritter)
OutDevices =
1×4 cell array
{‘Default’} {‘Primary Sound Driver’} {‘Altavoces Laptop (2- Realtek(R) Audio)’} {‘Altavoces (office)’}
In Windows, the playback device is listed correctly, and I can run the Test on Sound Playback window confirming each of the 16 streams in the EV‑SC594‑EZKIT and also using audioDeviceReader in simulink.
The output device is listed as ‘WASAPI’
>> deviceWritter = audioDeviceWriter(Driver="WASAPI"); OutDevices=getAudioDevices(deviceWritter)
OutDevices =
1×4 cell array
{‘Default’} {‘SC594 (EV-SC594 (16x16x16bit))’} {‘Altavoces Laptop (2- Realtek(R) Audio)’} {‘Altavoces (office)’}
But I am having next error:
Error:Error in ‘AudioAnalyzerSL/Audio Device
Writer’: PortAudio Error: Invalid sample rate
Is there any way I can use to send audio to that USB Audio Class 2.0 port?
Thanks,
Gilberto audiodevicewriter MATLAB Answers — New Questions
How to keep formatting when cutting and pasting to office
One thing that I would like to do is cut and paste a table to an email. When I do this however, particularly if a paste more than one table into the same email, the formatting doesn’t work. Particularly, the tables will be indented, but the second table will be indented from where the first table is indented, not from the start of the line.
I could paste as text only, but it would be nice to keep the formatting.
I could write to an excel sheet and then paste from there, but i don’t know how to keep the formatting doing that.
I asked copilot, but it doesn’t know how to help format a document.One thing that I would like to do is cut and paste a table to an email. When I do this however, particularly if a paste more than one table into the same email, the formatting doesn’t work. Particularly, the tables will be indented, but the second table will be indented from where the first table is indented, not from the start of the line.
I could paste as text only, but it would be nice to keep the formatting.
I could write to an excel sheet and then paste from there, but i don’t know how to keep the formatting doing that.
I asked copilot, but it doesn’t know how to help format a document. One thing that I would like to do is cut and paste a table to an email. When I do this however, particularly if a paste more than one table into the same email, the formatting doesn’t work. Particularly, the tables will be indented, but the second table will be indented from where the first table is indented, not from the start of the line.
I could paste as text only, but it would be nice to keep the formatting.
I could write to an excel sheet and then paste from there, but i don’t know how to keep the formatting doing that.
I asked copilot, but it doesn’t know how to help format a document. cut and paste, outlook, office, format, indent MATLAB Answers — New Questions
How to apply Mann Kendall and sen slope?
Hey everyone,
I need to apply Mann Kendall and sen slope in matlab, I dwnloaded the functions however, the sen slope that I got doesn’t make sense!
any help woud be highly appreciated!
RiyadhHey everyone,
I need to apply Mann Kendall and sen slope in matlab, I dwnloaded the functions however, the sen slope that I got doesn’t make sense!
any help woud be highly appreciated!
Riyadh Hey everyone,
I need to apply Mann Kendall and sen slope in matlab, I dwnloaded the functions however, the sen slope that I got doesn’t make sense!
any help woud be highly appreciated!
Riyadh mann kendall, sen slope MATLAB Answers — New Questions
Why do I receive a connection error when accessing Add-Ons Explorer or the Software Support Installer?
Why do I receive a connection error when accessing Add-Ons Explorer or the Software Support Installer?Why do I receive a connection error when accessing Add-Ons Explorer or the Software Support Installer? Why do I receive a connection error when accessing Add-Ons Explorer or the Software Support Installer? MATLAB Answers — New Questions
Why do I receive a connection error when launching MATLAB with Login Named User enabled?
Why do I receive the following error when launching MATLAB with Login Named User (LNU) enabled:
Connection ErrorWhy do I receive the following error when launching MATLAB with Login Named User (LNU) enabled:
Connection Error Why do I receive the following error when launching MATLAB with Login Named User (LNU) enabled:
Connection Error login, named, user, lnu, licensing, servers MATLAB Answers — New Questions
Timetables not fully supported by plot tools?
Hello,
I am just wondering why when plotting a timetable with duration as time axis, The "basic fitting" and "data statistics" tool in plot windos are not available.
Does this mean that timetables have some limitations compared to arrays or tables? I am asking because I need to decide if timetable is the right data structure for my use case. Basically I am importing some measuremet datas from sensors acquisition which have timestamps. In the past I would have just used plain arrays, but I see that in modern Matlab timetables are somehow suggested for these use cases.Hello,
I am just wondering why when plotting a timetable with duration as time axis, The "basic fitting" and "data statistics" tool in plot windos are not available.
Does this mean that timetables have some limitations compared to arrays or tables? I am asking because I need to decide if timetable is the right data structure for my use case. Basically I am importing some measuremet datas from sensors acquisition which have timestamps. In the past I would have just used plain arrays, but I see that in modern Matlab timetables are somehow suggested for these use cases. Hello,
I am just wondering why when plotting a timetable with duration as time axis, The "basic fitting" and "data statistics" tool in plot windos are not available.
Does this mean that timetables have some limitations compared to arrays or tables? I am asking because I need to decide if timetable is the right data structure for my use case. Basically I am importing some measuremet datas from sensors acquisition which have timestamps. In the past I would have just used plain arrays, but I see that in modern Matlab timetables are somehow suggested for these use cases. time series, data import MATLAB Answers — New Questions
General Blockproc questions that aren’t in the documentation
I have 4 question’s regarding Blockproc.
1: When you take an image and break it up into smaller images (ROI’s) to use blockproc, what is the exact order of the smaller images
In my image below, the yellow box is "top-left"
Q2: Also, is there away to show grid lines like above just to verify where blockproc has operated?
Q3: Is it possible to use blockproc and NOT operate on all the smaller images, i.e. just the images where the cyan circles are?
Q4: Can you combine functions so blockproc doesn’t have to run twice, e.g.:
fun = @(block_struct) mean2(block_struct.data);
AVG = blockproc(IM2,[500 500],fun,’UseParallel’,true);
fun2 = @(block_struct) std2(block_struct.data);
SD = blockproc(IM2,[500 500],fun2,’UseParallel’,true)
Thanks
JasonI have 4 question’s regarding Blockproc.
1: When you take an image and break it up into smaller images (ROI’s) to use blockproc, what is the exact order of the smaller images
In my image below, the yellow box is "top-left"
Q2: Also, is there away to show grid lines like above just to verify where blockproc has operated?
Q3: Is it possible to use blockproc and NOT operate on all the smaller images, i.e. just the images where the cyan circles are?
Q4: Can you combine functions so blockproc doesn’t have to run twice, e.g.:
fun = @(block_struct) mean2(block_struct.data);
AVG = blockproc(IM2,[500 500],fun,’UseParallel’,true);
fun2 = @(block_struct) std2(block_struct.data);
SD = blockproc(IM2,[500 500],fun2,’UseParallel’,true)
Thanks
Jason I have 4 question’s regarding Blockproc.
1: When you take an image and break it up into smaller images (ROI’s) to use blockproc, what is the exact order of the smaller images
In my image below, the yellow box is "top-left"
Q2: Also, is there away to show grid lines like above just to verify where blockproc has operated?
Q3: Is it possible to use blockproc and NOT operate on all the smaller images, i.e. just the images where the cyan circles are?
Q4: Can you combine functions so blockproc doesn’t have to run twice, e.g.:
fun = @(block_struct) mean2(block_struct.data);
AVG = blockproc(IM2,[500 500],fun,’UseParallel’,true);
fun2 = @(block_struct) std2(block_struct.data);
SD = blockproc(IM2,[500 500],fun2,’UseParallel’,true)
Thanks
Jason blockproc MATLAB Answers — New Questions
In MATLAB, when an operation is manually terminated by the user via actions like Ctrl+C, the command line will print a prompt message that includes the relevant line number in
In MATLAB, when an operation is manually terminated by the user via actions like Ctrl+C, the command line will print a prompt message that includes the relevant line number in legacy versions (e.g., R2016); however, this line number is omitted from the prompt in newer releases such as R2022.
function custom_interrupt_info()
disp(‘程序启动,按下Ctrl+C可中止并显示详细行号…’);
iteration_num = 100000; % 模拟耗时迭代
try
% #################### 你的核心业务代码 ####################
for i = 1:iteration_num
disp([‘当前执行第 ‘, num2str(i), ‘ 次迭代’]);
pause(0.03); % 模拟耗时操作,方便触发Ctrl+C
temp_result = i * 2; % 示例计算逻辑
end
% ##########################################################
finally
% 关键:无论是否中止,都获取并输出完整中止信息(含行号)
disp(‘=====================================================’);
disp(‘==================== 中止详细信息 ====================’);
stack_info = dbstack; % 提取堆栈信息(核心:获取行号)
if ~isempty(stack_info)
% 输出自定义详细信息,包含行号、文件、函数
disp([‘✅ 中止文件:’, stack_info(1).file]);
disp([‘✅ 中止行号:’, num2str(stack_info(1).line)]);
disp([‘✅ 所在脚本/函数:’, stack_info(1).name]);
else
disp(‘✅ 程序正常结束,无中止操作’);
end
disp(‘=====================================================’);
end
endIn MATLAB, when an operation is manually terminated by the user via actions like Ctrl+C, the command line will print a prompt message that includes the relevant line number in legacy versions (e.g., R2016); however, this line number is omitted from the prompt in newer releases such as R2022.
function custom_interrupt_info()
disp(‘程序启动,按下Ctrl+C可中止并显示详细行号…’);
iteration_num = 100000; % 模拟耗时迭代
try
% #################### 你的核心业务代码 ####################
for i = 1:iteration_num
disp([‘当前执行第 ‘, num2str(i), ‘ 次迭代’]);
pause(0.03); % 模拟耗时操作,方便触发Ctrl+C
temp_result = i * 2; % 示例计算逻辑
end
% ##########################################################
finally
% 关键:无论是否中止,都获取并输出完整中止信息(含行号)
disp(‘=====================================================’);
disp(‘==================== 中止详细信息 ====================’);
stack_info = dbstack; % 提取堆栈信息(核心:获取行号)
if ~isempty(stack_info)
% 输出自定义详细信息,包含行号、文件、函数
disp([‘✅ 中止文件:’, stack_info(1).file]);
disp([‘✅ 中止行号:’, num2str(stack_info(1).line)]);
disp([‘✅ 所在脚本/函数:’, stack_info(1).name]);
else
disp(‘✅ 程序正常结束,无中止操作’);
end
disp(‘=====================================================’);
end
end In MATLAB, when an operation is manually terminated by the user via actions like Ctrl+C, the command line will print a prompt message that includes the relevant line number in legacy versions (e.g., R2016); however, this line number is omitted from the prompt in newer releases such as R2022.
function custom_interrupt_info()
disp(‘程序启动,按下Ctrl+C可中止并显示详细行号…’);
iteration_num = 100000; % 模拟耗时迭代
try
% #################### 你的核心业务代码 ####################
for i = 1:iteration_num
disp([‘当前执行第 ‘, num2str(i), ‘ 次迭代’]);
pause(0.03); % 模拟耗时操作,方便触发Ctrl+C
temp_result = i * 2; % 示例计算逻辑
end
% ##########################################################
finally
% 关键:无论是否中止,都获取并输出完整中止信息(含行号)
disp(‘=====================================================’);
disp(‘==================== 中止详细信息 ====================’);
stack_info = dbstack; % 提取堆栈信息(核心:获取行号)
if ~isempty(stack_info)
% 输出自定义详细信息,包含行号、文件、函数
disp([‘✅ 中止文件:’, stack_info(1).file]);
disp([‘✅ 中止行号:’, num2str(stack_info(1).line)]);
disp([‘✅ 所在脚本/函数:’, stack_info(1).name]);
else
disp(‘✅ 程序正常结束,无中止操作’);
end
disp(‘=====================================================’);
end
end line number, prompt message ctrl+c MATLAB Answers — New Questions
Can I remove MATLAB DMR files from the temp directory?
I have been using MATLAB & Simulink for a few months, and my C drive now contains many MATLAB temporary files with the extension .dmr. Can I delete these files?I have been using MATLAB & Simulink for a few months, and my C drive now contains many MATLAB temporary files with the extension .dmr. Can I delete these files? I have been using MATLAB & Simulink for a few months, and my C drive now contains many MATLAB temporary files with the extension .dmr. Can I delete these files? dmr, tempfile, simulink, sdi MATLAB Answers — New Questions
Dealing with Duration format
I have a file containing the values of the position of the body’s center of pressure, calculated during the trial. I would like to plot the time elapsed (which has the format ‘0:0:0:064’) vs the position. When I open the file (.xlsx) with "readtable", it reads me all the values as "string" and not numbers. I tried to solve this with "str2double", and while this works for the position column, is useless for the time elapsed. When I change the extension (i.e. .csv orb .txt) it converts all the durations into NaNs, even though in the "Import Data" mask it is written at the top of the time elapsed column "duration". As a result, I cannot plot the time on the x-axis.
If I run this piece of code for example:
data = readtable("AdaptationTestProva.xlsx");
x = str2double(data.x_StaticVR_RawMediolateralAxis);
y = str2double(data.TimeElapsed);
plot(y,x)
I get an empty graph.
What can I do to get a standard graph with a usable elapsed time?
If this can be helpful, I’ll leave attached an example of the file.I have a file containing the values of the position of the body’s center of pressure, calculated during the trial. I would like to plot the time elapsed (which has the format ‘0:0:0:064’) vs the position. When I open the file (.xlsx) with "readtable", it reads me all the values as "string" and not numbers. I tried to solve this with "str2double", and while this works for the position column, is useless for the time elapsed. When I change the extension (i.e. .csv orb .txt) it converts all the durations into NaNs, even though in the "Import Data" mask it is written at the top of the time elapsed column "duration". As a result, I cannot plot the time on the x-axis.
If I run this piece of code for example:
data = readtable("AdaptationTestProva.xlsx");
x = str2double(data.x_StaticVR_RawMediolateralAxis);
y = str2double(data.TimeElapsed);
plot(y,x)
I get an empty graph.
What can I do to get a standard graph with a usable elapsed time?
If this can be helpful, I’ll leave attached an example of the file. I have a file containing the values of the position of the body’s center of pressure, calculated during the trial. I would like to plot the time elapsed (which has the format ‘0:0:0:064’) vs the position. When I open the file (.xlsx) with "readtable", it reads me all the values as "string" and not numbers. I tried to solve this with "str2double", and while this works for the position column, is useless for the time elapsed. When I change the extension (i.e. .csv orb .txt) it converts all the durations into NaNs, even though in the "Import Data" mask it is written at the top of the time elapsed column "duration". As a result, I cannot plot the time on the x-axis.
If I run this piece of code for example:
data = readtable("AdaptationTestProva.xlsx");
x = str2double(data.x_StaticVR_RawMediolateralAxis);
y = str2double(data.TimeElapsed);
plot(y,x)
I get an empty graph.
What can I do to get a standard graph with a usable elapsed time?
If this can be helpful, I’ll leave attached an example of the file. #duration, #plot, #conversion MATLAB Answers — New Questions
How can I set an expiration or override date for my license file?
How can I set an expiration (override) date for my license file? Can this date be different from the expiration date of the license itself?How can I set an expiration (override) date for my license file? Can this date be different from the expiration date of the license itself? How can I set an expiration (override) date for my license file? Can this date be different from the expiration date of the license itself? MATLAB Answers — New Questions
How do I license my Docker container using a Campus-Wide or Startup Individual license?
How do I license my Docker container using a Campus-Wide or Startup Individual license?How do I license my Docker container using a Campus-Wide or Startup Individual license? How do I license my Docker container using a Campus-Wide or Startup Individual license? MATLAB Answers — New Questions
TI C2000 I2C Receive with Interrupt not working (Simulink)
Hello,
I have a setup with a ESP32S3 Dev-Module as I²C master and a TI C2000 TMS320F28069M board as a I²C slave. The ESP32 is supposed to send the C2000 several signal. Each signal has three bytes. First a comand byte to separate the signals and then two bytes as payload (uint16 or int16). The C2000-code is implemented in Simulink. In the future, the C2000 shall respond to certain signals with data.
My first issue is that the I2C RCV (Receive) Block outputs my signals in a way that the the byte order changes. For example, the comand byte which is supposed to be always the first byte is sometimes the second or third byte. The order changes throughout restarts and is not predictable. As a solution to this problem I want to use I²C interrupts. This brings me to my second and main question:
I can not get the I²C communication to work with the interrupts. My ESP32 stops sending data as soon as the C2000 code with I²C interrupts is uploaded and running. It seems like the I²C ISR of the C2000 is never called and somehow stops the ESP32 from sending further messages.
To diagnose my problem, I already did the following without success:
Added a free-running counter in the ISR-function to see if the function gets called. The counter stays at zero.
Analyzed and used code-fragments of the C2000 c28x_i2c_eeprom_interrupt example in my code.
Checked I²C with oscilloscope and bus-decoder: Without the Interrupts, the I²C Messages are transmitted and acknowledged. With Interrupt, a successful transmission happens exactly one time, then stops. SCL stays low, SDA stays high.
Tried different Interrupts, tried different interrupt settings.
My guesses:
Wrong settings/configuration of ISR/hardware /some registers
Timing problems
Some kind of incompactibility between C2000/ESP32
User error
I attached 4 screenshots of my settings, the my code-example and two screenshots without ISR and two with ISR of my oscilloscope.
I prepared a small Simulink file with my code. If you want to run the code, open "Nur_I2C.slx". Open the subsystem. There are two parts, one with ISR and one without. Just comment one part and uncomment the other. Everything after the delay is for the differentiation of the signals.Hello,
I have a setup with a ESP32S3 Dev-Module as I²C master and a TI C2000 TMS320F28069M board as a I²C slave. The ESP32 is supposed to send the C2000 several signal. Each signal has three bytes. First a comand byte to separate the signals and then two bytes as payload (uint16 or int16). The C2000-code is implemented in Simulink. In the future, the C2000 shall respond to certain signals with data.
My first issue is that the I2C RCV (Receive) Block outputs my signals in a way that the the byte order changes. For example, the comand byte which is supposed to be always the first byte is sometimes the second or third byte. The order changes throughout restarts and is not predictable. As a solution to this problem I want to use I²C interrupts. This brings me to my second and main question:
I can not get the I²C communication to work with the interrupts. My ESP32 stops sending data as soon as the C2000 code with I²C interrupts is uploaded and running. It seems like the I²C ISR of the C2000 is never called and somehow stops the ESP32 from sending further messages.
To diagnose my problem, I already did the following without success:
Added a free-running counter in the ISR-function to see if the function gets called. The counter stays at zero.
Analyzed and used code-fragments of the C2000 c28x_i2c_eeprom_interrupt example in my code.
Checked I²C with oscilloscope and bus-decoder: Without the Interrupts, the I²C Messages are transmitted and acknowledged. With Interrupt, a successful transmission happens exactly one time, then stops. SCL stays low, SDA stays high.
Tried different Interrupts, tried different interrupt settings.
My guesses:
Wrong settings/configuration of ISR/hardware /some registers
Timing problems
Some kind of incompactibility between C2000/ESP32
User error
I attached 4 screenshots of my settings, the my code-example and two screenshots without ISR and two with ISR of my oscilloscope.
I prepared a small Simulink file with my code. If you want to run the code, open "Nur_I2C.slx". Open the subsystem. There are two parts, one with ISR and one without. Just comment one part and uncomment the other. Everything after the delay is for the differentiation of the signals. Hello,
I have a setup with a ESP32S3 Dev-Module as I²C master and a TI C2000 TMS320F28069M board as a I²C slave. The ESP32 is supposed to send the C2000 several signal. Each signal has three bytes. First a comand byte to separate the signals and then two bytes as payload (uint16 or int16). The C2000-code is implemented in Simulink. In the future, the C2000 shall respond to certain signals with data.
My first issue is that the I2C RCV (Receive) Block outputs my signals in a way that the the byte order changes. For example, the comand byte which is supposed to be always the first byte is sometimes the second or third byte. The order changes throughout restarts and is not predictable. As a solution to this problem I want to use I²C interrupts. This brings me to my second and main question:
I can not get the I²C communication to work with the interrupts. My ESP32 stops sending data as soon as the C2000 code with I²C interrupts is uploaded and running. It seems like the I²C ISR of the C2000 is never called and somehow stops the ESP32 from sending further messages.
To diagnose my problem, I already did the following without success:
Added a free-running counter in the ISR-function to see if the function gets called. The counter stays at zero.
Analyzed and used code-fragments of the C2000 c28x_i2c_eeprom_interrupt example in my code.
Checked I²C with oscilloscope and bus-decoder: Without the Interrupts, the I²C Messages are transmitted and acknowledged. With Interrupt, a successful transmission happens exactly one time, then stops. SCL stays low, SDA stays high.
Tried different Interrupts, tried different interrupt settings.
My guesses:
Wrong settings/configuration of ISR/hardware /some registers
Timing problems
Some kind of incompactibility between C2000/ESP32
User error
I attached 4 screenshots of my settings, the my code-example and two screenshots without ISR and two with ISR of my oscilloscope.
I prepared a small Simulink file with my code. If you want to run the code, open "Nur_I2C.slx". Open the subsystem. There are two parts, one with ISR and one without. Just comment one part and uncomment the other. Everything after the delay is for the differentiation of the signals. c2000, i2c, i²c, communication, hardware, isr, interrupt MATLAB Answers — New Questions
Is there any matlab documentation that can explain why multiplying empty arrays gives zero matrices?
Is there any matlab documentation that can explain why multiplying empty arrays gives zero matrices?
Here is the sample
A=double.empty(5,0);
B=double.empty(0,5);
C=A*B
C =
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0Is there any matlab documentation that can explain why multiplying empty arrays gives zero matrices?
Here is the sample
A=double.empty(5,0);
B=double.empty(0,5);
C=A*B
C =
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0 Is there any matlab documentation that can explain why multiplying empty arrays gives zero matrices?
Here is the sample
A=double.empty(5,0);
B=double.empty(0,5);
C=A*B
C =
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0 mtimes, empty, arithmetic operations, operators and elementary operations MATLAB Answers — New Questions
I want to calculate efficiency, response time, and thd for Dynamic voltage restorer with FLC for power quality improvement.
I am done with the simulink,now try to calculate the thd ,efficiency and response time.i tried but cannot calculate.I am done with the simulink,now try to calculate the thd ,efficiency and response time.i tried but cannot calculate. I am done with the simulink,now try to calculate the thd ,efficiency and response time.i tried but cannot calculate. simulink, matlab MATLAB Answers — New Questions
How to view private properties of a class in the debugger?
I author a handful of Digital Signal Processing algorithms in System objects (they are very handy indeed). Recently after upgrading to R2025b from R2024a I’ve hit an annoying snag. Most of the state, etc. of a system object will be in private properties. In prior versions, I could set a breakpoint in the stepImpl for instance and if I clicked on "obj" (the standard internal name for my object handle inside methods), I could see in the variable editor the value of all the properties, not just the externally visible ones. Then, I could step through the algorithm and make sure everything was computing correctly. Now there’s no handy way to do this? I tried the class browser but that doesn’t readily show the values of the current instance of the class. Why was this critical feature broken?I author a handful of Digital Signal Processing algorithms in System objects (they are very handy indeed). Recently after upgrading to R2025b from R2024a I’ve hit an annoying snag. Most of the state, etc. of a system object will be in private properties. In prior versions, I could set a breakpoint in the stepImpl for instance and if I clicked on "obj" (the standard internal name for my object handle inside methods), I could see in the variable editor the value of all the properties, not just the externally visible ones. Then, I could step through the algorithm and make sure everything was computing correctly. Now there’s no handy way to do this? I tried the class browser but that doesn’t readily show the values of the current instance of the class. Why was this critical feature broken? I author a handful of Digital Signal Processing algorithms in System objects (they are very handy indeed). Recently after upgrading to R2025b from R2024a I’ve hit an annoying snag. Most of the state, etc. of a system object will be in private properties. In prior versions, I could set a breakpoint in the stepImpl for instance and if I clicked on "obj" (the standard internal name for my object handle inside methods), I could see in the variable editor the value of all the properties, not just the externally visible ones. Then, I could step through the algorithm and make sure everything was computing correctly. Now there’s no handy way to do this? I tried the class browser but that doesn’t readily show the values of the current instance of the class. Why was this critical feature broken? debug, system object MATLAB Answers — New Questions
HDL multi rate simulation
I’m having trouble understanding how to speed up the simulation when everything is running at the hardware rate. I have a clock interface that is running at 50 MHz and I have simulink sampling rates set to 20e-9 s and then I have enabled the setting "Treat Simulink rates as actual hardware rates" in order to model to communication interface such as the AXI4 master correctly. However, the simulation comes to crawl even though controller and plant can be run at a slower rate. Is there a way I can speed up the simulation while maintaining cycle accurate fidelity?I’m having trouble understanding how to speed up the simulation when everything is running at the hardware rate. I have a clock interface that is running at 50 MHz and I have simulink sampling rates set to 20e-9 s and then I have enabled the setting "Treat Simulink rates as actual hardware rates" in order to model to communication interface such as the AXI4 master correctly. However, the simulation comes to crawl even though controller and plant can be run at a slower rate. Is there a way I can speed up the simulation while maintaining cycle accurate fidelity? I’m having trouble understanding how to speed up the simulation when everything is running at the hardware rate. I have a clock interface that is running at 50 MHz and I have simulink sampling rates set to 20e-9 s and then I have enabled the setting "Treat Simulink rates as actual hardware rates" in order to model to communication interface such as the AXI4 master correctly. However, the simulation comes to crawl even though controller and plant can be run at a slower rate. Is there a way I can speed up the simulation while maintaining cycle accurate fidelity? hdl coder MATLAB Answers — New Questions
Eigenvalue analysis of Outer-tub dynamic assembly of Front load washing machine
Hi,
Currently , I am working on an MBD system (Outer-tub dynamic assembly of Front Load washing machine, with two hanging linear springs and 3 friction dampers). I want to compute the linearized dynamic model to perform the Eigenvalue analysis. I am following a research paper by Prof. Bae (An Implementation method of linearized equations of motion for multibody systems with closed loops). I compared the computed stiffness matric with Recurdyn computed stiffness matrix. RecurDyn provided two different stiffness matrices (one for static analysis and another one for Eigenvalue analysis). My stiffness matrix (Python code as Prof Bae paper) is matching with the Recurdyn stiffness matrix computed for static analysis.
I want to know why are these two stiffness matrices of RecurDyn different, and How to compute them?Hi,
Currently , I am working on an MBD system (Outer-tub dynamic assembly of Front Load washing machine, with two hanging linear springs and 3 friction dampers). I want to compute the linearized dynamic model to perform the Eigenvalue analysis. I am following a research paper by Prof. Bae (An Implementation method of linearized equations of motion for multibody systems with closed loops). I compared the computed stiffness matric with Recurdyn computed stiffness matrix. RecurDyn provided two different stiffness matrices (one for static analysis and another one for Eigenvalue analysis). My stiffness matrix (Python code as Prof Bae paper) is matching with the Recurdyn stiffness matrix computed for static analysis.
I want to know why are these two stiffness matrices of RecurDyn different, and How to compute them? Hi,
Currently , I am working on an MBD system (Outer-tub dynamic assembly of Front Load washing machine, with two hanging linear springs and 3 friction dampers). I want to compute the linearized dynamic model to perform the Eigenvalue analysis. I am following a research paper by Prof. Bae (An Implementation method of linearized equations of motion for multibody systems with closed loops). I compared the computed stiffness matric with Recurdyn computed stiffness matrix. RecurDyn provided two different stiffness matrices (one for static analysis and another one for Eigenvalue analysis). My stiffness matrix (Python code as Prof Bae paper) is matching with the Recurdyn stiffness matrix computed for static analysis.
I want to know why are these two stiffness matrices of RecurDyn different, and How to compute them? linearized dynamic model, eigenvalue analysis, outer-tub dynamic assembly wit, washing machine, static equilibrium, linear and torsional springs MATLAB Answers — New Questions









