Category: News
customizing Stakeholders’s setting so that they can only see the shared dashboard in Azure Devops!
hi every body
how can I customize the access settings of Stakeholders in a way that they can NOT see the backlog/board details, especially “assigned to” field
and they can follow the project only from the dashboards and analytic views or board/backlog without details
hi every bodyhow can I customize the access settings of Stakeholders in a way that they can NOT see the backlog/board details, especially “assigned to” fieldand they can follow the project only from the dashboards and analytic views or board/backlog without details Read More
Initially during reation of storage account i did not allowed enabled infrastructure scope.
Later i created using encryption scopes.Then i created a bolob container in advanced section while adding a infrastructure scope it is not showing no availablse scope.
In which step i would miss please correct me.
Later i created using encryption scopes.Then i created a bolob container in advanced section while adding a infrastructure scope it is not showing no availablse scope.In which step i would miss please correct me. Read More
How do I programmatically set the parameters of a Get Transform block?
I want to programmatically set the rigid body tree parameter of a get transform block and I tried doing that using the set_param function. If i write the value of the parameter as a string:
set_param(strcat(modelName, ‘/Get Transform’), ‘RigidBodyTree’, ‘DOF3_Arm’) %DOF3_Arm = importrobot(‘RobotStructure’);
the associated field in the Block’s Parameter will just have a string but no rigid body tree, and if I use a variable instead of the string i get the following error:
Error using Script_function_back2WF
Invalid setting in Get Transform block (mask) ‘Get Transform’ for parameter
‘RigidBodyTree’
What is the correct way of setting this parameter? Thank you in advance!I want to programmatically set the rigid body tree parameter of a get transform block and I tried doing that using the set_param function. If i write the value of the parameter as a string:
set_param(strcat(modelName, ‘/Get Transform’), ‘RigidBodyTree’, ‘DOF3_Arm’) %DOF3_Arm = importrobot(‘RobotStructure’);
the associated field in the Block’s Parameter will just have a string but no rigid body tree, and if I use a variable instead of the string i get the following error:
Error using Script_function_back2WF
Invalid setting in Get Transform block (mask) ‘Get Transform’ for parameter
‘RigidBodyTree’
What is the correct way of setting this parameter? Thank you in advance! I want to programmatically set the rigid body tree parameter of a get transform block and I tried doing that using the set_param function. If i write the value of the parameter as a string:
set_param(strcat(modelName, ‘/Get Transform’), ‘RigidBodyTree’, ‘DOF3_Arm’) %DOF3_Arm = importrobot(‘RobotStructure’);
the associated field in the Block’s Parameter will just have a string but no rigid body tree, and if I use a variable instead of the string i get the following error:
Error using Script_function_back2WF
Invalid setting in Get Transform block (mask) ‘Get Transform’ for parameter
‘RigidBodyTree’
What is the correct way of setting this parameter? Thank you in advance! matlab, simulink, matlab code, functions MATLAB Answers — New Questions
How to Create Slicing Number of 2D plots in matlab
How to Create Slicing Number of 2D plots in matlab Similar plot which i was uploadedHow to Create Slicing Number of 2D plots in matlab Similar plot which i was uploaded How to Create Slicing Number of 2D plots in matlab Similar plot which i was uploaded for research graphs plotting MATLAB Answers — New Questions
Multiple PID tuning in order to control all four states in the inverted pendulum model
Hi!
I have to control the four states of the classical nonlinear inverted pendulum on a cart model (position and velocity of the cart, angle and angular velocity of the pendulum) in Simulink through PID control. Being on a cart it doesn’t have to go through the swing up, the initial condition for the angle is -0.5 (desired angle with a small perturbation), so it’s just the balancing problem.
This is my Simulink control scheme:
My implementation works as it should, but I had to manually tune the four PIDs because I wasn’t able to obtain the same system with just one controller (if I give a vector of the four errors as input to a single PID block designed with a vector of four gains it messes up and creates a 4-dimensional output instead of executing the row-column product) and I tried everything but couldn’t tune the multiple PIDs at the same time. Of course, the tuner app embedded in every PID block is useless in my case since the output of the system isn’t just depending on a single PID’s control input. I wonder if I can automatically find the optimal choices for the PID controllers, can someone help me?Hi!
I have to control the four states of the classical nonlinear inverted pendulum on a cart model (position and velocity of the cart, angle and angular velocity of the pendulum) in Simulink through PID control. Being on a cart it doesn’t have to go through the swing up, the initial condition for the angle is -0.5 (desired angle with a small perturbation), so it’s just the balancing problem.
This is my Simulink control scheme:
My implementation works as it should, but I had to manually tune the four PIDs because I wasn’t able to obtain the same system with just one controller (if I give a vector of the four errors as input to a single PID block designed with a vector of four gains it messes up and creates a 4-dimensional output instead of executing the row-column product) and I tried everything but couldn’t tune the multiple PIDs at the same time. Of course, the tuner app embedded in every PID block is useless in my case since the output of the system isn’t just depending on a single PID’s control input. I wonder if I can automatically find the optimal choices for the PID controllers, can someone help me? Hi!
I have to control the four states of the classical nonlinear inverted pendulum on a cart model (position and velocity of the cart, angle and angular velocity of the pendulum) in Simulink through PID control. Being on a cart it doesn’t have to go through the swing up, the initial condition for the angle is -0.5 (desired angle with a small perturbation), so it’s just the balancing problem.
This is my Simulink control scheme:
My implementation works as it should, but I had to manually tune the four PIDs because I wasn’t able to obtain the same system with just one controller (if I give a vector of the four errors as input to a single PID block designed with a vector of four gains it messes up and creates a 4-dimensional output instead of executing the row-column product) and I tried everything but couldn’t tune the multiple PIDs at the same time. Of course, the tuner app embedded in every PID block is useless in my case since the output of the system isn’t just depending on a single PID’s control input. I wonder if I can automatically find the optimal choices for the PID controllers, can someone help me? pid, tuning, simulink MATLAB Answers — New Questions
Azure App Service Flask Deployment issues with Error “didn’t respond to HTTP pings on port: 8000”
Hello Everyone,
I am Deploying the Flask Web app with Immersive Reader and I am trying deploying it by a ZIP file, tried with visual studio code too by the steps mentioned over the link below:
https://learn.microsoft.com/en-us/azure/app-service/quickstart-python?tabs=flask%2Cwindows%2Cazure-cli%2Czip-deploy%2Cdeploy-instructions-azportal%2Cterminal-bash%2Cdeploy-instructions-zip-azcli
So, I have gone through each step mentioned there and applied it and showing me the below result.
I have gone through diagnostic resources. But didn’t find any solution for the following error in logs.
Hello Everyone,I am Deploying the Flask Web app with Immersive Reader and I am trying deploying it by a ZIP file, tried with visual studio code too by the steps mentioned over the link below:https://learn.microsoft.com/en-us/azure/app-service/quickstart-python?tabs=flask%2Cwindows%2Cazure-cli%2Czip-deploy%2Cdeploy-instructions-azportal%2Cterminal-bash%2Cdeploy-instructions-zip-azcliSo, I have gone through each step mentioned there and applied it and showing me the below result. I have gone through diagnostic resources. But didn’t find any solution for the following error in logs. Read More
Form won’t close to open main
I have a login page and a main page. On my login page, I has this for the code and everything works fine.
Private Sub btn_login_Click()
If DCount(“uusername”, “usertable”, “uusername= ‘” & txt_username & “‘ and upassword= ‘” & txt_password & “‘”) = 0 Then
Me.lbl_incorrect.Visible = True
Else
DoCmd.Close acForm, “LoginForm”
DoCmd.OpenForm “MainForm”
End If
End Sub
On my main page I have this code when logging out. Some reason when I click yes it just sits there on that form. I don’t know what I am missing.
Private Sub btn_logout_Click()
respond = MsgBox(“Do you really want to logout?”, vbYesNo + vbQuestion, “| Logout Confirmation |”)
If response = vbYes Then
DoCmd.Close acForm, “MainForm”, acSaveNo
DoCmd.OpenForm “LoginForm”
Else
Cancel = True
End If
End Sub
I have a login page and a main page. On my login page, I has this for the code and everything works fine. Private Sub btn_login_Click()
If DCount(“uusername”, “usertable”, “uusername= ‘” & txt_username & “‘ and upassword= ‘” & txt_password & “‘”) = 0 Then
Me.lbl_incorrect.Visible = True
Else
DoCmd.Close acForm, “LoginForm”
DoCmd.OpenForm “MainForm”
End If
End Sub On my main page I have this code when logging out. Some reason when I click yes it just sits there on that form. I don’t know what I am missing. Private Sub btn_logout_Click()
respond = MsgBox(“Do you really want to logout?”, vbYesNo + vbQuestion, “| Logout Confirmation |”)
If response = vbYes Then
DoCmd.Close acForm, “MainForm”, acSaveNo
DoCmd.OpenForm “LoginForm”
Else
Cancel = True
End If
End Sub Read More
Fusing layers of a color image
Hi,
After segmenting the 3 layers of a Truecolor image , I tried to fuse the segmented images but an error appear , every layer is an rgb image after overlaying a color for the region to segmented using ind2rgb
<</matlabcentral/answers/uploaded_files/48640/voi1.PNG>>
<</matlabcentral/answers/uploaded_files/48641/voi2.PNG>>
<</matlabcentral/answers/uploaded_files/48642/voi3.PNG>>
here is the code
image(I_rgb1)
im1=imoverlay(FC1,FC1~=2)
title(sprintf(‘Fuzzy connected component 1’));
figure(2)
image(I_rgb2)
im2=imoverlay(FC2,FC2~=2)
title(sprintf(‘Fuzzy connected component 2’));
figure(3)
image(I_rgb3)
im3=imoverlay(FC3,FC3~=2);
title(sprintf(‘Fuzzy connected component 3’));
FC= cat(3,im1,im2,im3);
when i want to display the image, image() doesn’t work also imshow()
figure ;
imshow(FC,[])
% the error: images.internal.imageDisplayParseInputs({‘Parent’,’Border’,’Reduce’},preparsed_varargin{:});
image(FC)
% the error :Invalid datatype for Image CData. Numeric or logical matrix required for image CData.Hi,
After segmenting the 3 layers of a Truecolor image , I tried to fuse the segmented images but an error appear , every layer is an rgb image after overlaying a color for the region to segmented using ind2rgb
<</matlabcentral/answers/uploaded_files/48640/voi1.PNG>>
<</matlabcentral/answers/uploaded_files/48641/voi2.PNG>>
<</matlabcentral/answers/uploaded_files/48642/voi3.PNG>>
here is the code
image(I_rgb1)
im1=imoverlay(FC1,FC1~=2)
title(sprintf(‘Fuzzy connected component 1’));
figure(2)
image(I_rgb2)
im2=imoverlay(FC2,FC2~=2)
title(sprintf(‘Fuzzy connected component 2’));
figure(3)
image(I_rgb3)
im3=imoverlay(FC3,FC3~=2);
title(sprintf(‘Fuzzy connected component 3’));
FC= cat(3,im1,im2,im3);
when i want to display the image, image() doesn’t work also imshow()
figure ;
imshow(FC,[])
% the error: images.internal.imageDisplayParseInputs({‘Parent’,’Border’,’Reduce’},preparsed_varargin{:});
image(FC)
% the error :Invalid datatype for Image CData. Numeric or logical matrix required for image CData. Hi,
After segmenting the 3 layers of a Truecolor image , I tried to fuse the segmented images but an error appear , every layer is an rgb image after overlaying a color for the region to segmented using ind2rgb
<</matlabcentral/answers/uploaded_files/48640/voi1.PNG>>
<</matlabcentral/answers/uploaded_files/48641/voi2.PNG>>
<</matlabcentral/answers/uploaded_files/48642/voi3.PNG>>
here is the code
image(I_rgb1)
im1=imoverlay(FC1,FC1~=2)
title(sprintf(‘Fuzzy connected component 1’));
figure(2)
image(I_rgb2)
im2=imoverlay(FC2,FC2~=2)
title(sprintf(‘Fuzzy connected component 2’));
figure(3)
image(I_rgb3)
im3=imoverlay(FC3,FC3~=2);
title(sprintf(‘Fuzzy connected component 3’));
FC= cat(3,im1,im2,im3);
when i want to display the image, image() doesn’t work also imshow()
figure ;
imshow(FC,[])
% the error: images.internal.imageDisplayParseInputs({‘Parent’,’Border’,’Reduce’},preparsed_varargin{:});
image(FC)
% the error :Invalid datatype for Image CData. Numeric or logical matrix required for image CData. display color image, truecolorimage, indexedimage, overlaying, superpose MATLAB Answers — New Questions
How to detect right triangles from an image and find the three side lengths of each triangle?
Post Content Post Content digital image processing, hough MATLAB Answers — New Questions
Extracting Data from an Array of Arrays using a Loop?
Hello All,
Context: I am using Simulink and Simscape to simulate some system responses to motion. Simulation output writes to the Matlab workspace to an Array of Arrays (object maybe? Not super sure if that’s the right nomenclature) called "out". Our model is set up such that it iterates over a range of values for a single parameter. One test might have 5 iterations, the next might have 50, and so on. This means "out" changes size each time we run our model.
Problem: Now on to the issue. I am trying to extract data from each iteration and put them all into a Matrix. I can access all the data I want manually, using the notation "out(1,1).RollAngle.Data" for the first iteration, "out(1,2).RollAngle.Data" for the second iteration, and so on. However, this is too cumbersome since most of our tests are going to have 20-plus iterations.
Can anybody help me create a for loop that would append each data series as a new column in a matrix? This might be super obvious, but it’s a new problem for me…
Thanks!Hello All,
Context: I am using Simulink and Simscape to simulate some system responses to motion. Simulation output writes to the Matlab workspace to an Array of Arrays (object maybe? Not super sure if that’s the right nomenclature) called "out". Our model is set up such that it iterates over a range of values for a single parameter. One test might have 5 iterations, the next might have 50, and so on. This means "out" changes size each time we run our model.
Problem: Now on to the issue. I am trying to extract data from each iteration and put them all into a Matrix. I can access all the data I want manually, using the notation "out(1,1).RollAngle.Data" for the first iteration, "out(1,2).RollAngle.Data" for the second iteration, and so on. However, this is too cumbersome since most of our tests are going to have 20-plus iterations.
Can anybody help me create a for loop that would append each data series as a new column in a matrix? This might be super obvious, but it’s a new problem for me…
Thanks! Hello All,
Context: I am using Simulink and Simscape to simulate some system responses to motion. Simulation output writes to the Matlab workspace to an Array of Arrays (object maybe? Not super sure if that’s the right nomenclature) called "out". Our model is set up such that it iterates over a range of values for a single parameter. One test might have 5 iterations, the next might have 50, and so on. This means "out" changes size each time we run our model.
Problem: Now on to the issue. I am trying to extract data from each iteration and put them all into a Matrix. I can access all the data I want manually, using the notation "out(1,1).RollAngle.Data" for the first iteration, "out(1,2).RollAngle.Data" for the second iteration, and so on. However, this is too cumbersome since most of our tests are going to have 20-plus iterations.
Can anybody help me create a for loop that would append each data series as a new column in a matrix? This might be super obvious, but it’s a new problem for me…
Thanks! arrays, simulation output, append data to matrix, matlab MATLAB Answers — New Questions
Inverter DC Capacitor Voltage Control
Using PI to control the DC capacitor voltage of the inverter, but there are pulses from 0.4 seconds. I don’t know what the cause is.Using PI to control the DC capacitor voltage of the inverter, but there are pulses from 0.4 seconds. I don’t know what the cause is. Using PI to control the DC capacitor voltage of the inverter, but there are pulses from 0.4 seconds. I don’t know what the cause is. inverter MATLAB Answers — New Questions
How to speed up my code (computing jacobian)
My input are a lot of linear expressions such as x1+x2, x2+3*x3 etc. How to speed up my code as follows
allvars = symvar(input); % There are about 1000 LINEAR expressions in ‘input’
J = jacobian(input, allvars);My input are a lot of linear expressions such as x1+x2, x2+3*x3 etc. How to speed up my code as follows
allvars = symvar(input); % There are about 1000 LINEAR expressions in ‘input’
J = jacobian(input, allvars); My input are a lot of linear expressions such as x1+x2, x2+3*x3 etc. How to speed up my code as follows
allvars = symvar(input); % There are about 1000 LINEAR expressions in ‘input’
J = jacobian(input, allvars); symbolic, linear, matlab MATLAB Answers — New Questions
unresolvable roledefinitionId in roleEligibilitySchedules
I query roleManagement/directory/roleEligibilitySchedules to make an inventory of all assigned Entra ID roles through Priviledged Identity Management.
Each role assignment has a property RoleDefinitionId, which refers to the id of the Entra ID role (a list I got from roleManagement/directory/roleDefinitions, it includes custom roles).
My problem is that a RoleDefinitionId can only be found for builtin roles, not for custom roles.
A custom role has a Guid that cannot be found/resolved anywhere it seems.
Is this a bug ? Or am I missing something?
Cheers,
Sem
I query roleManagement/directory/roleEligibilitySchedules to make an inventory of all assigned Entra ID roles through Priviledged Identity Management.Each role assignment has a property RoleDefinitionId, which refers to the id of the Entra ID role (a list I got from roleManagement/directory/roleDefinitions, it includes custom roles). My problem is that a RoleDefinitionId can only be found for builtin roles, not for custom roles. A custom role has a Guid that cannot be found/resolved anywhere it seems. Is this a bug ? Or am I missing something? Cheers,Sem Read More
Setup error installation Office 365
Hello everyone, I am having problems installing Office within my company, and I cannot find a solution to this problem. The following errors appear to me both when using the setup.exe that I download from my Office365 profile, and when using the xml configuration file.
I hope for your help, I am quite desperate.
Hello everyone, I am having problems installing Office within my company, and I cannot find a solution to this problem. The following errors appear to me both when using the setup.exe that I download from my Office365 profile, and when using the xml configuration file.I hope for your help, I am quite desperate. Read More
Merge multiple files containing given string into one mat file
Hello,
How to merge multiple files which names contains given strings (for instance: Name, ECG, data) into one file?Hello,
How to merge multiple files which names contains given strings (for instance: Name, ECG, data) into one file? Hello,
How to merge multiple files which names contains given strings (for instance: Name, ECG, data) into one file? merge multiple files containing given string into MATLAB Answers — New Questions
How to solve this error?
I keep getting this error while running the state space model,
Error in port widths or dimensions. Output port 1 of ‘statespacemodel_hvm/Mux’ is a one dimensional vector with 2 elements.
Error in port widths or dimensions. Input port 1 of ‘statespacemodel_hvm/State-Space’ has 3 elements. This port does not accept the dimensions (or orientation) specified by the input signal.
Please help me with this.I keep getting this error while running the state space model,
Error in port widths or dimensions. Output port 1 of ‘statespacemodel_hvm/Mux’ is a one dimensional vector with 2 elements.
Error in port widths or dimensions. Input port 1 of ‘statespacemodel_hvm/State-Space’ has 3 elements. This port does not accept the dimensions (or orientation) specified by the input signal.
Please help me with this. I keep getting this error while running the state space model,
Error in port widths or dimensions. Output port 1 of ‘statespacemodel_hvm/Mux’ is a one dimensional vector with 2 elements.
Error in port widths or dimensions. Input port 1 of ‘statespacemodel_hvm/State-Space’ has 3 elements. This port does not accept the dimensions (or orientation) specified by the input signal.
Please help me with this. error MATLAB Answers — New Questions
_api/search/query doesn’t seems to consider the sourceid, siteid or webid.
Hi Friends,
I am using SharePoint Online and I have 2 site collections. I am using the Search REST API and I would like to search only in one site collection. But the search is performed at tenant level always, though the sourceId or SiteId or WebId GUID values are provided in the API request.
Site Collections
https://xxxx.SharePoint.com/sites/SC1
https://xxxx.SharePoint.com/sites/SC2
Search REST API query
I have tried all 3 and all results includes SC2 data as well.
_api/search/query?querytext=’1234’&siteId='[GUID of SC1]’_api/search/query?querytext=’1234’&sourceId='[GUID of SC1]’_api/search/query?querytext=’1234’&webId='[GUID of SC1]’
I am sending the query using Power Automate Flow.
Looking for help for fix.
Thanks
Anjan
Hi Friends,I am using SharePoint Online and I have 2 site collections. I am using the Search REST API and I would like to search only in one site collection. But the search is performed at tenant level always, though the sourceId or SiteId or WebId GUID values are provided in the API request. Site Collectionshttps://xxxx.SharePoint.com/sites/SC1https://xxxx.SharePoint.com/sites/SC2 Search REST API queryI have tried all 3 and all results includes SC2 data as well._api/search/query?querytext=’1234’&siteId='[GUID of SC1]’_api/search/query?querytext=’1234’&sourceId='[GUID of SC1]’_api/search/query?querytext=’1234’&webId='[GUID of SC1]’ I am sending the query using Power Automate Flow. Looking for help for fix. ThanksAnjan Read More
i need help to find the mathematical equation that can made this model in pic (how can convert pressure drop to air velocity (dp to Vx) in modeling of OWC
Post Content Post Content in modeling of owc MATLAB Answers — New Questions
Best/Cleanest way to select a specific sheet from an excel file?
I am importing an excel file that has multiple sheets. I am using the readtable command to import the file. For the sheet choice, I am giving the read table command the ‘Sheet’ modifier with the sheet name.
My question is about getting the sheet name. Currently, I have the "sheetnames" command get a string array of the sheet names, then I use "listdlg" to display them and return a selection. the listdlg command is just not the best though. The formatting does not look very good, and I have multiple monitors. It does not pop up on the same monitor or the previously used monitor. It always pops up on the first, which if you need to run the program many times quickly, means you have to move across all monitors to select an option. Is there a better way to format it or an alternative to the "listdlg"?
Is there a different way of doing all of this that is better than sheetnames and listdlg? My program I’ve written pretty heavily relies on "readtable", so I cannot change that aspect.
% get the file name and file path of the selected excel file
[fileName,pathName] = uigetfile(‘*xlsx;*.xls’,’Select the Excel file’);
% check if user canceled file selection and act accordingly
if fileName == 0
return;
end
% combine the file name and file path to get the complete file path of the
% selected excel file
completeTableFilePath = fullfile(pathName,fileName);
% gather the names of all the sheets of the excel file
sheetNamesArray = sheetnames(completeTableFilePath);
% create a dialog box that lists all the sheet names in the file and
% prompts the user to pick one
sheetChoice = listdlg(‘PromptString’,’Select the sheet:’,’SelectionMode’,’single’,’ListString’,sheetNamesArray);
% check if user canceled file selection
if isempty(sheetChoice)
return;
end
% remembers the index of the selected excel sheet
sheetChoiceFileName = sheetNamesArray(sheetChoice);
% intake the specific sheet of the selected excel file as strings
inputTable = readtable(completeTableFilePath,’Sheet’,sheetChoiceFileName,’TextType’,’string’);I am importing an excel file that has multiple sheets. I am using the readtable command to import the file. For the sheet choice, I am giving the read table command the ‘Sheet’ modifier with the sheet name.
My question is about getting the sheet name. Currently, I have the "sheetnames" command get a string array of the sheet names, then I use "listdlg" to display them and return a selection. the listdlg command is just not the best though. The formatting does not look very good, and I have multiple monitors. It does not pop up on the same monitor or the previously used monitor. It always pops up on the first, which if you need to run the program many times quickly, means you have to move across all monitors to select an option. Is there a better way to format it or an alternative to the "listdlg"?
Is there a different way of doing all of this that is better than sheetnames and listdlg? My program I’ve written pretty heavily relies on "readtable", so I cannot change that aspect.
% get the file name and file path of the selected excel file
[fileName,pathName] = uigetfile(‘*xlsx;*.xls’,’Select the Excel file’);
% check if user canceled file selection and act accordingly
if fileName == 0
return;
end
% combine the file name and file path to get the complete file path of the
% selected excel file
completeTableFilePath = fullfile(pathName,fileName);
% gather the names of all the sheets of the excel file
sheetNamesArray = sheetnames(completeTableFilePath);
% create a dialog box that lists all the sheet names in the file and
% prompts the user to pick one
sheetChoice = listdlg(‘PromptString’,’Select the sheet:’,’SelectionMode’,’single’,’ListString’,sheetNamesArray);
% check if user canceled file selection
if isempty(sheetChoice)
return;
end
% remembers the index of the selected excel sheet
sheetChoiceFileName = sheetNamesArray(sheetChoice);
% intake the specific sheet of the selected excel file as strings
inputTable = readtable(completeTableFilePath,’Sheet’,sheetChoiceFileName,’TextType’,’string’); I am importing an excel file that has multiple sheets. I am using the readtable command to import the file. For the sheet choice, I am giving the read table command the ‘Sheet’ modifier with the sheet name.
My question is about getting the sheet name. Currently, I have the "sheetnames" command get a string array of the sheet names, then I use "listdlg" to display them and return a selection. the listdlg command is just not the best though. The formatting does not look very good, and I have multiple monitors. It does not pop up on the same monitor or the previously used monitor. It always pops up on the first, which if you need to run the program many times quickly, means you have to move across all monitors to select an option. Is there a better way to format it or an alternative to the "listdlg"?
Is there a different way of doing all of this that is better than sheetnames and listdlg? My program I’ve written pretty heavily relies on "readtable", so I cannot change that aspect.
% get the file name and file path of the selected excel file
[fileName,pathName] = uigetfile(‘*xlsx;*.xls’,’Select the Excel file’);
% check if user canceled file selection and act accordingly
if fileName == 0
return;
end
% combine the file name and file path to get the complete file path of the
% selected excel file
completeTableFilePath = fullfile(pathName,fileName);
% gather the names of all the sheets of the excel file
sheetNamesArray = sheetnames(completeTableFilePath);
% create a dialog box that lists all the sheet names in the file and
% prompts the user to pick one
sheetChoice = listdlg(‘PromptString’,’Select the sheet:’,’SelectionMode’,’single’,’ListString’,sheetNamesArray);
% check if user canceled file selection
if isempty(sheetChoice)
return;
end
% remembers the index of the selected excel sheet
sheetChoiceFileName = sheetNamesArray(sheetChoice);
% intake the specific sheet of the selected excel file as strings
inputTable = readtable(completeTableFilePath,’Sheet’,sheetChoiceFileName,’TextType’,’string’); listdlg, importing excel data, performance, gui MATLAB Answers — New Questions