Category: News
What license I need ?
I use MATLAB for preparing journal publications. I have no benifits from these publications.I use MATLAB for preparing journal publications. I have no benifits from these publications. I use MATLAB for preparing journal publications. I have no benifits from these publications. journal publication MATLAB Answers — New Questions
Use Retime of a timetable to interpolate to timestamps of another timetable, without interpolating across NaNs
I am trying to interpolate values within one timetable to the timestamps in another timetable. However, I do not want to interpolate across gaps where NaNs exist, which occurs when using the standard retime function.I am trying to interpolate values within one timetable to the timestamps in another timetable. However, I do not want to interpolate across gaps where NaNs exist, which occurs when using the standard retime function. I am trying to interpolate values within one timetable to the timestamps in another timetable. However, I do not want to interpolate across gaps where NaNs exist, which occurs when using the standard retime function. retime, omit nan, interpolation MATLAB Answers — New Questions
Outlook Email sync error
Hello
Please i need your help on this issue.
We have a user who is having issue with sync error.
she isn’t seeing her emails displayed on outlook app. Her email is hosted by bluehost
she is getting the sync error
Hello Please i need your help on this issue. We have a user who is having issue with sync error. she isn’t seeing her emails displayed on outlook app. Her email is hosted by bluehost she is getting the sync error Read More
Ricki Lake Weight Loss (OFFICIAL PRICE BUY) People also ask How did Ricki Lake lose all the weight?
Lake, who was partnered with pro Derek Hough on the ballroom competition, told Us that she attributed her weight loss to intense rehearsals and Freshology diet delivery meals. More recently, Lake and husband Ross Burningham lost 30 pounds each after overhauling their diet and fitness regimens in late 2023.
Lake, who was partnered with pro Derek Hough on the ballroom competition, told Us that she attributed her weight loss to intense rehearsals and Freshology diet delivery meals. More recently, Lake and husband Ross Burningham lost 30 pounds each after overhauling their diet and fitness regimens in late 2023. Read More
Excel not Inserting new or copied lines
20 years of Excel and I’ve never had this problem before. Excel is not Inserting (new or copied) lines on two separate files I have open. It is a simple pricing sheet with 10-12 columns (some descriptive, some formulas taking info from 2 or 3 columns in the same line and I want to add several lines of new products above my Totalizing line.
I’ve always highlighted 8 lines,, copied and inserted above the top highlighted line. Today it does nothing. Same if I highlight 8 lines and right click and choose insert lines.. Again nothing. I assume it must be a SETTING of some sort but cant find anything to lead me to it.
What is going on? Help
20 years of Excel and I’ve never had this problem before. Excel is not Inserting (new or copied) lines on two separate files I have open. It is a simple pricing sheet with 10-12 columns (some descriptive, some formulas taking info from 2 or 3 columns in the same line and I want to add several lines of new products above my Totalizing line.I’ve always highlighted 8 lines,, copied and inserted above the top highlighted line. Today it does nothing. Same if I highlight 8 lines and right click and choose insert lines.. Again nothing. I assume it must be a SETTING of some sort but cant find anything to lead me to it. What is going on? Help Read More
Authentication attempts from new country
Hi , I am trying to capture users who are sign in to china and Africa based on the alert name authentication attempts from new country .
and would need some help here
Hi , I am trying to capture users who are sign in to china and Africa based on the alert name authentication attempts from new country .and would need some help here Read More
How can I delete files from a install.wim?
Hi,
I just made the mistake of capturing an old Windows 10 install disk image without first removing documents (files) in Documents, Downloads and Pictures folders. If possible, how can I now delete those files from the install.wim? I understand that I would first have to mount the install.wim. But I don’t know what to do next.
Thank you in advance.
Hi,I just made the mistake of capturing an old Windows 10 install disk image without first removing documents (files) in Documents, Downloads and Pictures folders. If possible, how can I now delete those files from the install.wim? I understand that I would first have to mount the install.wim. But I don’t know what to do next.Thank you in advance. Read More
Unpost as News
How to unpost a page as news in SharePoint Online?
How to unpost a page as news in SharePoint Online? Read More
Bachelor and Masters in Health Science Microsoft: How to obtain one?
Hi everyone
Can someone help me find the right sources to get started with the bachelor and Masters in Health and Lifesciences?
Thank you
Hi everyoneCan someone help me find the right sources to get started with the bachelor and Masters in Health and Lifesciences?Thank you Read More
New Teams randomly crashes affecting most applications requiring reboot
Hello
Please i need your help on this issue.
Late last week one of our users experienced an issue with New Teams which has been off-and-ongoing which affected two computers logged in as him.
A similar issue occurred while he was using teams web version. It would crash Google chrome and make other application windows black.
During April, I did an org-wide block of New Teams forced upgrade and Jeremy was able to use old Teams without issue.
I have tried updating the video drivers, removing a potentially problematic webcam, SFC /scan now, repair install of New Teams. DISM commands. Unable to pinpoint a cause or solution. It only seems to happen to this one user.
Hello Please i need your help on this issue. Late last week one of our users experienced an issue with New Teams which has been off-and-ongoing which affected two computers logged in as him. A similar issue occurred while he was using teams web version. It would crash Google chrome and make other application windows black. During April, I did an org-wide block of New Teams forced upgrade and Jeremy was able to use old Teams without issue. I have tried updating the video drivers, removing a potentially problematic webcam, SFC /scan now, repair install of New Teams. DISM commands. Unable to pinpoint a cause or solution. It only seems to happen to this one user. Read More
Listing tabs in a channel encounters “Value cannot be null. (Parameter ‘stringToUnescape’)” error
Hi,
We use the List tabs in channel API in our product, and it works fine for all cases, except one.
We notice that when sending this API with one of our customer’s channel, we will get the following response:
{
“error”: {
“code”: “BadRequest”,
“message”: “Value cannot be null. (Parameter ‘stringToUnescape’)”,
“innerError”: {
“code”: “InvalidRequest”,
“message”: “Value cannot be null. (Parameter ‘stringToUnescape’)”,
“details”: [],
“date”: “2024-05-10T01:38:38”,
“request-id”: “10e6b074-a2dc-4950-aae5-8bbe68d838b8”,
“client-request-id”: “10e6b074-a2dc-4950-aae5-8bbe68d838b8”
}
}
}
No matter we tried how many times, this error persists.
For comparison, if we send the same API on another channel, we can get correct response.
Do anyone also encounter this error?
We hope Microsoft could help us figure out why and how we can handle this case.
Thank you.
Hi, We use the List tabs in channel API in our product, and it works fine for all cases, except one.We notice that when sending this API with one of our customer’s channel, we will get the following response: {
“error”: {
“code”: “BadRequest”,
“message”: “Value cannot be null. (Parameter ‘stringToUnescape’)”,
“innerError”: {
“code”: “InvalidRequest”,
“message”: “Value cannot be null. (Parameter ‘stringToUnescape’)”,
“details”: [],
“date”: “2024-05-10T01:38:38”,
“request-id”: “10e6b074-a2dc-4950-aae5-8bbe68d838b8”,
“client-request-id”: “10e6b074-a2dc-4950-aae5-8bbe68d838b8”
}
}
} No matter we tried how many times, this error persists.For comparison, if we send the same API on another channel, we can get correct response. Do anyone also encounter this error?We hope Microsoft could help us figure out why and how we can handle this case. Thank you. Read More
about wapd
i create web site for downloading wapd.dat file. if config URL in system proxy,the wapd file can work, if use auto find the file by nbns, PC can download the file, but the file do not work. the pc system is win 10 ,the borwse is Chrome
i create web site for downloading wapd.dat file. if config URL in system proxy,the wapd file can work, if use auto find the file by nbns, PC can download the file, but the file do not work. the pc system is win 10 ,the borwse is Chrome Read More
Adjusting VM Size in Classic Cloud Services Without .csdef access for Migration to CSES
Co-Authors: David Padilla, Pablo Castro
Scenario
Customers migrating from Classic Cloud Service to Cloud Service (Extended Support) often face a challenge if they have been running Classic Cloud Services for years without changes, leading to lost source code or only having access to the final product (package and .cscfg files).
A frequent migration issue arises when the Classic Cloud Service utilizes a deprecated VM SKU Family like (A-Series), and without the source code, customers are unable to modify the VM size in the Service Definition File and repackage the project.
The following Blog will help in this specific scenario to allow the migration without the need for the source code.
Requirement
Access to the config files. If you do not have access to these files, please reference the following blog about How to retrieve Cloud Service Packages from an existing Classic Cloud Service.
Step #1
Change the package extension .cspkg to .zip.
Step #2
Unzip the .cspkg file and change the extension of the .csdx file to zip.
Step #3
Unzip the .csdx file.
Step #4
Access the Service Definition file
Step #5
Open and edit the VM size (in this case we changed from “Standard_A1_v2” to “Standard_D1_v2“) and save it.
Step #6
Since the file has changed, it is necessary to get the new hash, this is possible using the PowerShell command Get-FileHash.
Step #7
On same directory where the Definition file is, the .csman file is available, this is the Manifest.
Step #8
Edit the .csman file, changing the hash of the .csdef using the new one obtained from PowerShell on Step #6.
Step #9
IMPORTANT. It is necessary to zip again all the files, however, if we zip the folder unzipped it will fail:
You need to be inside the unzipped folder where you did the changes of csdef and csman file
Select all the files and zip them.
After, you should move this new zip file outside from “cspkgchangetestSDPackage_56bee6e2-6455-4f15-b8b5-c5328044988c” to “cspkgchangetest” and rename it and change de extension to csdx Example: SDPackage_56bee6e2-6455-4f15-b8b5-c5328044988c.csdx
Delete the old “SDPackage_56bee6e2-6455-4f15-b8b5-c5328044988c” zip file and unzipped folder
Step #10
At “cspkgchangetest” level having the new modified csdx file, you should repeat the steps that you did with the csdef file:
Use the PowerShell command Get-FileHash the get a new hash to “SDPackage_56bee6e2-6455-4f15-b8b5-c5328044988c.csdx”
Edit de csman file changing the hash of “SDPackage_56bee6e2-6455-4f15-b8b5-c5328044988c.csdx”
Now, we are ready to zip the package and deploy.
Step #11 Finally, it should be able to update the cloud service deployment using the new files, to update the VM Size.
DISCLAIMER
While the process described is indeed functional and accurate, it is advisable to employ it only as a contingency measure or as a way to obtain the original csdef file to later use these files as a reference for the creation of a new solution and subsequently create a new deployment
Microsoft Tech Community – Latest Blogs –Read More
error using saveas in fig format
Hellow Dear,
I tried to save a figure using saveas in fig format and I got several error messages. Saving the same figure in other format such as jpg is fine.
% plot
for page = 1: num_page
if ci_end(page) > numel(screened_contact)
ci_end(page) = numel(screened_contact);
end
figure(page), clf
sgtitle(‘ Compare orig vs interpolated stim artifact in data pre-processing’)
pageF = nrow_subp*ncol_subp*(page -1); % factor to compensate subplot# after page1
for ci = ci_begin(page) : ci_end(page)
subplot(nrow_subp, ncol_subp, ci-pageF), hold on
%grayColor = [.7 .7 .7];
plot(timevec, ref_EP(ci, :), ‘k’, "LineWidth", 1)
plot(timevec, prepro_EP(ci, :), ‘r’, "LineWidth", 1)
title( strjoin([num2str(ci) ‘, C’ num2str(screened_contact(ci)) ‘, ‘ region(ci) ‘, ‘ region_abbrev(ci)]) )
plot([0 0], get(gca,’ylim’), ‘k–‘, ‘linewidth’,1)
plot(get(gca,’xlim’) ,[0 0], ‘k–‘,’linewidth’, 1)
%yvalue = max([max(abs(ref_EP(ci,[1:900]))) max(abs(prepro_EP(ci,[1:900]))) ]);
%set(gca, ‘ylim’, [-1 1]* (yvalue+20))
%set(gca,’xtick’,[-0.1 0 0.2 0.4])
%set(gca, ‘xticklabels’, [-0.1 0 0.2 0.4])
set(gca, ‘xlim’, [-0.1 0.4])
end
set(gcf, ‘Position’, get(0, ‘Screensize’));
saveas(figure(1), [ char(output(1,:)) ‘preprocessed_vs_ref_con’ num2str(ci_begin(page)) ‘_to_’ num2str(ci_end(page)) ‘.fig’ ])
saveas(figure(1), [ char(output(1,:)) ‘preprocessed_vs_ref_con’ num2str(ci_begin(page)) ‘_to_’ num2str(ci_end(page)) ‘.jpg’ ])
close(1)
endHellow Dear,
I tried to save a figure using saveas in fig format and I got several error messages. Saving the same figure in other format such as jpg is fine.
% plot
for page = 1: num_page
if ci_end(page) > numel(screened_contact)
ci_end(page) = numel(screened_contact);
end
figure(page), clf
sgtitle(‘ Compare orig vs interpolated stim artifact in data pre-processing’)
pageF = nrow_subp*ncol_subp*(page -1); % factor to compensate subplot# after page1
for ci = ci_begin(page) : ci_end(page)
subplot(nrow_subp, ncol_subp, ci-pageF), hold on
%grayColor = [.7 .7 .7];
plot(timevec, ref_EP(ci, :), ‘k’, "LineWidth", 1)
plot(timevec, prepro_EP(ci, :), ‘r’, "LineWidth", 1)
title( strjoin([num2str(ci) ‘, C’ num2str(screened_contact(ci)) ‘, ‘ region(ci) ‘, ‘ region_abbrev(ci)]) )
plot([0 0], get(gca,’ylim’), ‘k–‘, ‘linewidth’,1)
plot(get(gca,’xlim’) ,[0 0], ‘k–‘,’linewidth’, 1)
%yvalue = max([max(abs(ref_EP(ci,[1:900]))) max(abs(prepro_EP(ci,[1:900]))) ]);
%set(gca, ‘ylim’, [-1 1]* (yvalue+20))
%set(gca,’xtick’,[-0.1 0 0.2 0.4])
%set(gca, ‘xticklabels’, [-0.1 0 0.2 0.4])
set(gca, ‘xlim’, [-0.1 0.4])
end
set(gcf, ‘Position’, get(0, ‘Screensize’));
saveas(figure(1), [ char(output(1,:)) ‘preprocessed_vs_ref_con’ num2str(ci_begin(page)) ‘_to_’ num2str(ci_end(page)) ‘.fig’ ])
saveas(figure(1), [ char(output(1,:)) ‘preprocessed_vs_ref_con’ num2str(ci_begin(page)) ‘_to_’ num2str(ci_end(page)) ‘.jpg’ ])
close(1)
end Hellow Dear,
I tried to save a figure using saveas in fig format and I got several error messages. Saving the same figure in other format such as jpg is fine.
% plot
for page = 1: num_page
if ci_end(page) > numel(screened_contact)
ci_end(page) = numel(screened_contact);
end
figure(page), clf
sgtitle(‘ Compare orig vs interpolated stim artifact in data pre-processing’)
pageF = nrow_subp*ncol_subp*(page -1); % factor to compensate subplot# after page1
for ci = ci_begin(page) : ci_end(page)
subplot(nrow_subp, ncol_subp, ci-pageF), hold on
%grayColor = [.7 .7 .7];
plot(timevec, ref_EP(ci, :), ‘k’, "LineWidth", 1)
plot(timevec, prepro_EP(ci, :), ‘r’, "LineWidth", 1)
title( strjoin([num2str(ci) ‘, C’ num2str(screened_contact(ci)) ‘, ‘ region(ci) ‘, ‘ region_abbrev(ci)]) )
plot([0 0], get(gca,’ylim’), ‘k–‘, ‘linewidth’,1)
plot(get(gca,’xlim’) ,[0 0], ‘k–‘,’linewidth’, 1)
%yvalue = max([max(abs(ref_EP(ci,[1:900]))) max(abs(prepro_EP(ci,[1:900]))) ]);
%set(gca, ‘ylim’, [-1 1]* (yvalue+20))
%set(gca,’xtick’,[-0.1 0 0.2 0.4])
%set(gca, ‘xticklabels’, [-0.1 0 0.2 0.4])
set(gca, ‘xlim’, [-0.1 0.4])
end
set(gcf, ‘Position’, get(0, ‘Screensize’));
saveas(figure(1), [ char(output(1,:)) ‘preprocessed_vs_ref_con’ num2str(ci_begin(page)) ‘_to_’ num2str(ci_end(page)) ‘.fig’ ])
saveas(figure(1), [ char(output(1,:)) ‘preprocessed_vs_ref_con’ num2str(ci_begin(page)) ‘_to_’ num2str(ci_end(page)) ‘.jpg’ ])
close(1)
end saveas, fig MATLAB Answers — New Questions
Avoid overlapping different graphs that are placed in the same positions
Hello, I’m currently trying to plot two graphs in App Designer at the same position. They keep overlapping themselves and I’m not sure how to fix this issue. When I do "hold on" and "hold off", it opens another window where the graphs are shown. Is there any way to acheive this?Hello, I’m currently trying to plot two graphs in App Designer at the same position. They keep overlapping themselves and I’m not sure how to fix this issue. When I do "hold on" and "hold off", it opens another window where the graphs are shown. Is there any way to acheive this? Hello, I’m currently trying to plot two graphs in App Designer at the same position. They keep overlapping themselves and I’m not sure how to fix this issue. When I do "hold on" and "hold off", it opens another window where the graphs are shown. Is there any way to acheive this? appdesigner, graphs, geoplot MATLAB Answers — New Questions
clear all output code
Is it possible in matlab live script to "clear all output" with a program code?Is it possible in matlab live script to "clear all output" with a program code? Is it possible in matlab live script to "clear all output" with a program code? clear_all_output MATLAB Answers — New Questions
obtaining heart rate from ECG signal
Hello,
I need to obtain heart rate values from an ECG signal. While searching for information, I discovered that I need to (more or less) get the RR interval and then use the time difference between samples to calculate the instantaneous HR.
I have a database acquired in the local hospital, but the raw signal is full of noise and invalid samples but I dont know how to remove both.
Attached you can find of the raw ECG. It is sampled at 1kHz, stored in int16 data type and the measured units are milivolts.
fl = fopen("ficheroAnalogico.dat");
A = fread(fl, inf, ‘int16’);
fclose(fl);
figure(1)
subplot(3,1,1);
plot(A);
title(‘raw’);
subplot(3,1,2);
plot(A_4000);
title(‘zoom’);
I use this short code to read the data and plot it, but, as you can see in the capute, the data is full of noise and invalid samples.
The second plot show the first 4000 samples, where you can see the R peaks, but I need to filter and remove invalid samples before calculating HR. Can you please help me? I know I’m asking for too much, but I haven’t programmed in more than 10 years, so my knowlegde is rusted and I’m really stucked.
Thanks you in advance and sorry for my english.
DanielHello,
I need to obtain heart rate values from an ECG signal. While searching for information, I discovered that I need to (more or less) get the RR interval and then use the time difference between samples to calculate the instantaneous HR.
I have a database acquired in the local hospital, but the raw signal is full of noise and invalid samples but I dont know how to remove both.
Attached you can find of the raw ECG. It is sampled at 1kHz, stored in int16 data type and the measured units are milivolts.
fl = fopen("ficheroAnalogico.dat");
A = fread(fl, inf, ‘int16’);
fclose(fl);
figure(1)
subplot(3,1,1);
plot(A);
title(‘raw’);
subplot(3,1,2);
plot(A_4000);
title(‘zoom’);
I use this short code to read the data and plot it, but, as you can see in the capute, the data is full of noise and invalid samples.
The second plot show the first 4000 samples, where you can see the R peaks, but I need to filter and remove invalid samples before calculating HR. Can you please help me? I know I’m asking for too much, but I haven’t programmed in more than 10 years, so my knowlegde is rusted and I’m really stucked.
Thanks you in advance and sorry for my english.
Daniel Hello,
I need to obtain heart rate values from an ECG signal. While searching for information, I discovered that I need to (more or less) get the RR interval and then use the time difference between samples to calculate the instantaneous HR.
I have a database acquired in the local hospital, but the raw signal is full of noise and invalid samples but I dont know how to remove both.
Attached you can find of the raw ECG. It is sampled at 1kHz, stored in int16 data type and the measured units are milivolts.
fl = fopen("ficheroAnalogico.dat");
A = fread(fl, inf, ‘int16’);
fclose(fl);
figure(1)
subplot(3,1,1);
plot(A);
title(‘raw’);
subplot(3,1,2);
plot(A_4000);
title(‘zoom’);
I use this short code to read the data and plot it, but, as you can see in the capute, the data is full of noise and invalid samples.
The second plot show the first 4000 samples, where you can see the R peaks, but I need to filter and remove invalid samples before calculating HR. Can you please help me? I know I’m asking for too much, but I haven’t programmed in more than 10 years, so my knowlegde is rusted and I’m really stucked.
Thanks you in advance and sorry for my english.
Daniel matlab, heart rate, ecg, intervalrr MATLAB Answers — New Questions
How to add unknow parameter in matrix and solve it by use det() syntax for find w
% under is what i did but seen it is not work for det(A) for find w
clc % clear history command and past result
syms w;
m1 = 1.8;
m2 = 6.3;
m3 = 5.4;
m4 = 22.5;
m5 = 54;
c2 = 10000;
c3 = 500;
c4 = 1500;
c5 = 1100;
k2 = 1*10^8;
k3 = 50*10^3;
k4 = 75*10^3;
k5 = 10*10^3;
% Form of matrix is Ax=b
% Where A is nxn matrix, x is displacement of lumped masses and b is RHS.
A= [0, 0, 0, 0, (m5*w^2)-k5-c5;
0, 0, k4+c4, -k4-c4+(m4*w^2)+k5+c5, -k5+c5;
k2+c2, -k3-c3-k2-c2+(m2*w^2), k3+c3, 0, 0;
-k2-c2+(m1*w^2), k2+c2, 0, 0, 0];
det (A);% under is what i did but seen it is not work for det(A) for find w
clc % clear history command and past result
syms w;
m1 = 1.8;
m2 = 6.3;
m3 = 5.4;
m4 = 22.5;
m5 = 54;
c2 = 10000;
c3 = 500;
c4 = 1500;
c5 = 1100;
k2 = 1*10^8;
k3 = 50*10^3;
k4 = 75*10^3;
k5 = 10*10^3;
% Form of matrix is Ax=b
% Where A is nxn matrix, x is displacement of lumped masses and b is RHS.
A= [0, 0, 0, 0, (m5*w^2)-k5-c5;
0, 0, k4+c4, -k4-c4+(m4*w^2)+k5+c5, -k5+c5;
k2+c2, -k3-c3-k2-c2+(m2*w^2), k3+c3, 0, 0;
-k2-c2+(m1*w^2), k2+c2, 0, 0, 0];
det (A); % under is what i did but seen it is not work for det(A) for find w
clc % clear history command and past result
syms w;
m1 = 1.8;
m2 = 6.3;
m3 = 5.4;
m4 = 22.5;
m5 = 54;
c2 = 10000;
c3 = 500;
c4 = 1500;
c5 = 1100;
k2 = 1*10^8;
k3 = 50*10^3;
k4 = 75*10^3;
k5 = 10*10^3;
% Form of matrix is Ax=b
% Where A is nxn matrix, x is displacement of lumped masses and b is RHS.
A= [0, 0, 0, 0, (m5*w^2)-k5-c5;
0, 0, k4+c4, -k4-c4+(m4*w^2)+k5+c5, -k5+c5;
k2+c2, -k3-c3-k2-c2+(m2*w^2), k3+c3, 0, 0;
-k2-c2+(m1*w^2), k2+c2, 0, 0, 0];
det (A); det, matrix, eliminant MATLAB Answers — New Questions
Why is uistyle(“Icon”,’error’) making a transparent icon when the UITable is not on the first tab of a tabgroup?
Breif description of what I am working on:
I am attempting to build a custom component in MATLAB appdesigner (R2023b) that functions as status bar/message center that I can use in any applications I build going forward. The plan was the have a tab group with three tabs: the first would have all messages (including ‘warnings’ and ‘errors’), the second would contain only those designated as ‘warnings’, and the third would contain only those designated as ‘errors.’ I wanted each tab to contain a table where each row is a single message with a message ID. I would then use the ‘Icon’ feature in the ‘uistyle’ function to display ‘warning’ and ‘error’ icons in the appropriate message cells.
The issue:
The ‘error’ icon on any UITable not on the first tab of a tab group always appears to be transparent. I’ve built up the simplest possible custom component that recreates the issue and included the code at the bottom of this post. In it, you can see that I use a for-loop to set the exact same uistyle on each table. The only difference is the tab that table exists on. For any tab that isn’t the first one, the error icon color gets messed up. This doesn’t appear to happen for any other icon types. Screenshots of my example code exhibitng the behavior are included below. This seems pretty clearly like unintended behavior, but I’m hoping for a way to work around it anyways.
classdef Example < matlab.ui.componentcontainer.ComponentContainer
% Properties that correspond to underlying components
properties (Access = private, Transient, NonCopyable)
TabGroup matlab.ui.container.TabGroup
Tab1 matlab.ui.container.Tab
UITable_1 matlab.ui.control.Table
Tab_2 matlab.ui.container.Tab
UITable_2 matlab.ui.control.Table
Tab3 matlab.ui.container.Tab
UITable_3 matlab.ui.control.Table
Tab4 matlab.ui.container.Tab
UITable_4 matlab.ui.control.Table
end
properties (Access = private)
first_time_run_flag logical = true;
end
methods (Access = protected)
% Code that executes when the value of a public property is changed
function update(comp)
% I use a flag to prevent the code from running this code more
% than a single time for the purposes of this example code
if comp.first_time_run_flag
dataToPutInTables = {1,’test info’;2,’test question’;3,’test warning’;4,’test error’;5,’test success’};
%Iterate through each table and add the data and format the
%styles
for i=1:4
currentTableName = sprintf(‘UITable_%d’,i);
comp.(currentTableName).Data = dataToPutInTables;
addStyle(comp.(currentTableName),uistyle("Icon",’info’),"cell",[1,2]);
addStyle(comp.(currentTableName),uistyle("Icon",’question’),"cell",[2,2]);
addStyle(comp.(currentTableName),uistyle("Icon",’warning’),"cell",[3,2]);
addStyle(comp.(currentTableName),uistyle("Icon",’error’),"cell",[4,2]);
addStyle(comp.(currentTableName),uistyle("Icon",’success’),"cell",[5,2]);
end
comp.first_time_run_flag = false;
end
end
% Create the underlying components
function setup(comp)
comp.Position = [1 1 320 240];
comp.BackgroundColor = [0.94 0.94 0.94];
% Create TabGroup
comp.TabGroup = uitabgroup(comp);
comp.TabGroup.Position = [1 1 320 240];
% Create Tab1
comp.Tab1 = uitab(comp.TabGroup);
comp.Tab1.Title = ‘Tab1’;
% Create UITable_1
comp.UITable_1 = uitable(comp.Tab1);
comp.UITable_1.ColumnName = {‘ID’; ‘Message’};
comp.UITable_1.RowName = {};
comp.UITable_1.Position = [1 1 318 215];
% Create Tab_2
comp.Tab_2 = uitab(comp.TabGroup);
comp.Tab_2.Title = ‘Tab2’;
% Create UITable_2
comp.UITable_2 = uitable(comp.Tab_2);
comp.UITable_2.ColumnName = {‘ID’; ‘Message’};
comp.UITable_2.RowName = {};
comp.UITable_2.Position = [1 1 318 215];
% Create Tab3
comp.Tab3 = uitab(comp.TabGroup);
comp.Tab3.Title = ‘Tab3’;
% Create UITable_3
comp.UITable_3 = uitable(comp.Tab3);
comp.UITable_3.ColumnName = {‘ID’; ‘Message’};
comp.UITable_3.RowName = {};
comp.UITable_3.Position = [1 1 318 215];
% Create Tab4
comp.Tab4 = uitab(comp.TabGroup);
comp.Tab4.Title = ‘Tab4’;
% Create UITable_4
comp.UITable_4 = uitable(comp.Tab4);
comp.UITable_4.ColumnName = {‘ID’; ‘Message’};
comp.UITable_4.RowName = {};
comp.UITable_4.Position = [1 1 318 215];
end
end
endBreif description of what I am working on:
I am attempting to build a custom component in MATLAB appdesigner (R2023b) that functions as status bar/message center that I can use in any applications I build going forward. The plan was the have a tab group with three tabs: the first would have all messages (including ‘warnings’ and ‘errors’), the second would contain only those designated as ‘warnings’, and the third would contain only those designated as ‘errors.’ I wanted each tab to contain a table where each row is a single message with a message ID. I would then use the ‘Icon’ feature in the ‘uistyle’ function to display ‘warning’ and ‘error’ icons in the appropriate message cells.
The issue:
The ‘error’ icon on any UITable not on the first tab of a tab group always appears to be transparent. I’ve built up the simplest possible custom component that recreates the issue and included the code at the bottom of this post. In it, you can see that I use a for-loop to set the exact same uistyle on each table. The only difference is the tab that table exists on. For any tab that isn’t the first one, the error icon color gets messed up. This doesn’t appear to happen for any other icon types. Screenshots of my example code exhibitng the behavior are included below. This seems pretty clearly like unintended behavior, but I’m hoping for a way to work around it anyways.
classdef Example < matlab.ui.componentcontainer.ComponentContainer
% Properties that correspond to underlying components
properties (Access = private, Transient, NonCopyable)
TabGroup matlab.ui.container.TabGroup
Tab1 matlab.ui.container.Tab
UITable_1 matlab.ui.control.Table
Tab_2 matlab.ui.container.Tab
UITable_2 matlab.ui.control.Table
Tab3 matlab.ui.container.Tab
UITable_3 matlab.ui.control.Table
Tab4 matlab.ui.container.Tab
UITable_4 matlab.ui.control.Table
end
properties (Access = private)
first_time_run_flag logical = true;
end
methods (Access = protected)
% Code that executes when the value of a public property is changed
function update(comp)
% I use a flag to prevent the code from running this code more
% than a single time for the purposes of this example code
if comp.first_time_run_flag
dataToPutInTables = {1,’test info’;2,’test question’;3,’test warning’;4,’test error’;5,’test success’};
%Iterate through each table and add the data and format the
%styles
for i=1:4
currentTableName = sprintf(‘UITable_%d’,i);
comp.(currentTableName).Data = dataToPutInTables;
addStyle(comp.(currentTableName),uistyle("Icon",’info’),"cell",[1,2]);
addStyle(comp.(currentTableName),uistyle("Icon",’question’),"cell",[2,2]);
addStyle(comp.(currentTableName),uistyle("Icon",’warning’),"cell",[3,2]);
addStyle(comp.(currentTableName),uistyle("Icon",’error’),"cell",[4,2]);
addStyle(comp.(currentTableName),uistyle("Icon",’success’),"cell",[5,2]);
end
comp.first_time_run_flag = false;
end
end
% Create the underlying components
function setup(comp)
comp.Position = [1 1 320 240];
comp.BackgroundColor = [0.94 0.94 0.94];
% Create TabGroup
comp.TabGroup = uitabgroup(comp);
comp.TabGroup.Position = [1 1 320 240];
% Create Tab1
comp.Tab1 = uitab(comp.TabGroup);
comp.Tab1.Title = ‘Tab1’;
% Create UITable_1
comp.UITable_1 = uitable(comp.Tab1);
comp.UITable_1.ColumnName = {‘ID’; ‘Message’};
comp.UITable_1.RowName = {};
comp.UITable_1.Position = [1 1 318 215];
% Create Tab_2
comp.Tab_2 = uitab(comp.TabGroup);
comp.Tab_2.Title = ‘Tab2’;
% Create UITable_2
comp.UITable_2 = uitable(comp.Tab_2);
comp.UITable_2.ColumnName = {‘ID’; ‘Message’};
comp.UITable_2.RowName = {};
comp.UITable_2.Position = [1 1 318 215];
% Create Tab3
comp.Tab3 = uitab(comp.TabGroup);
comp.Tab3.Title = ‘Tab3’;
% Create UITable_3
comp.UITable_3 = uitable(comp.Tab3);
comp.UITable_3.ColumnName = {‘ID’; ‘Message’};
comp.UITable_3.RowName = {};
comp.UITable_3.Position = [1 1 318 215];
% Create Tab4
comp.Tab4 = uitab(comp.TabGroup);
comp.Tab4.Title = ‘Tab4’;
% Create UITable_4
comp.UITable_4 = uitable(comp.Tab4);
comp.UITable_4.ColumnName = {‘ID’; ‘Message’};
comp.UITable_4.RowName = {};
comp.UITable_4.Position = [1 1 318 215];
end
end
end Breif description of what I am working on:
I am attempting to build a custom component in MATLAB appdesigner (R2023b) that functions as status bar/message center that I can use in any applications I build going forward. The plan was the have a tab group with three tabs: the first would have all messages (including ‘warnings’ and ‘errors’), the second would contain only those designated as ‘warnings’, and the third would contain only those designated as ‘errors.’ I wanted each tab to contain a table where each row is a single message with a message ID. I would then use the ‘Icon’ feature in the ‘uistyle’ function to display ‘warning’ and ‘error’ icons in the appropriate message cells.
The issue:
The ‘error’ icon on any UITable not on the first tab of a tab group always appears to be transparent. I’ve built up the simplest possible custom component that recreates the issue and included the code at the bottom of this post. In it, you can see that I use a for-loop to set the exact same uistyle on each table. The only difference is the tab that table exists on. For any tab that isn’t the first one, the error icon color gets messed up. This doesn’t appear to happen for any other icon types. Screenshots of my example code exhibitng the behavior are included below. This seems pretty clearly like unintended behavior, but I’m hoping for a way to work around it anyways.
classdef Example < matlab.ui.componentcontainer.ComponentContainer
% Properties that correspond to underlying components
properties (Access = private, Transient, NonCopyable)
TabGroup matlab.ui.container.TabGroup
Tab1 matlab.ui.container.Tab
UITable_1 matlab.ui.control.Table
Tab_2 matlab.ui.container.Tab
UITable_2 matlab.ui.control.Table
Tab3 matlab.ui.container.Tab
UITable_3 matlab.ui.control.Table
Tab4 matlab.ui.container.Tab
UITable_4 matlab.ui.control.Table
end
properties (Access = private)
first_time_run_flag logical = true;
end
methods (Access = protected)
% Code that executes when the value of a public property is changed
function update(comp)
% I use a flag to prevent the code from running this code more
% than a single time for the purposes of this example code
if comp.first_time_run_flag
dataToPutInTables = {1,’test info’;2,’test question’;3,’test warning’;4,’test error’;5,’test success’};
%Iterate through each table and add the data and format the
%styles
for i=1:4
currentTableName = sprintf(‘UITable_%d’,i);
comp.(currentTableName).Data = dataToPutInTables;
addStyle(comp.(currentTableName),uistyle("Icon",’info’),"cell",[1,2]);
addStyle(comp.(currentTableName),uistyle("Icon",’question’),"cell",[2,2]);
addStyle(comp.(currentTableName),uistyle("Icon",’warning’),"cell",[3,2]);
addStyle(comp.(currentTableName),uistyle("Icon",’error’),"cell",[4,2]);
addStyle(comp.(currentTableName),uistyle("Icon",’success’),"cell",[5,2]);
end
comp.first_time_run_flag = false;
end
end
% Create the underlying components
function setup(comp)
comp.Position = [1 1 320 240];
comp.BackgroundColor = [0.94 0.94 0.94];
% Create TabGroup
comp.TabGroup = uitabgroup(comp);
comp.TabGroup.Position = [1 1 320 240];
% Create Tab1
comp.Tab1 = uitab(comp.TabGroup);
comp.Tab1.Title = ‘Tab1’;
% Create UITable_1
comp.UITable_1 = uitable(comp.Tab1);
comp.UITable_1.ColumnName = {‘ID’; ‘Message’};
comp.UITable_1.RowName = {};
comp.UITable_1.Position = [1 1 318 215];
% Create Tab_2
comp.Tab_2 = uitab(comp.TabGroup);
comp.Tab_2.Title = ‘Tab2’;
% Create UITable_2
comp.UITable_2 = uitable(comp.Tab_2);
comp.UITable_2.ColumnName = {‘ID’; ‘Message’};
comp.UITable_2.RowName = {};
comp.UITable_2.Position = [1 1 318 215];
% Create Tab3
comp.Tab3 = uitab(comp.TabGroup);
comp.Tab3.Title = ‘Tab3’;
% Create UITable_3
comp.UITable_3 = uitable(comp.Tab3);
comp.UITable_3.ColumnName = {‘ID’; ‘Message’};
comp.UITable_3.RowName = {};
comp.UITable_3.Position = [1 1 318 215];
% Create Tab4
comp.Tab4 = uitab(comp.TabGroup);
comp.Tab4.Title = ‘Tab4’;
% Create UITable_4
comp.UITable_4 = uitable(comp.Tab4);
comp.UITable_4.ColumnName = {‘ID’; ‘Message’};
comp.UITable_4.RowName = {};
comp.UITable_4.Position = [1 1 318 215];
end
end
end appdesigner, uitable, color, customcomponent MATLAB Answers — New Questions
Extract a portion of text
Hi.
For the life of me, I can’t work out the formula to extract a portion of text before and after a text delimiter.
Column A – First part of text in cell only – SOLVED
Column B – Raw Data
Column C – Require the second part of the text only. – UNSOLVED
For example from row 2
A2 B2 C2
IA20240429001294 Raw Data Bateau Bay
Any help would be very appreciated before i loose all of my hair!!
Hi.For the life of me, I can’t work out the formula to extract a portion of text before and after a text delimiter.Column A – First part of text in cell only – SOLVEDColumn B – Raw DataColumn C – Require the second part of the text only. – UNSOLVED For example from row 2A2 B2 C2IA20240429001294 Raw Data Bateau Bay Any help would be very appreciated before i loose all of my hair!! Read More