フィルターのクリア

Create an app using app designer in MATLAB. The app is used to collecting data and storing the data.

2 ビュー (過去 30 日間)
I'm Creating an app for Collecting a data. For example: If we enter some numeric value for how many election boxes edit field, we should get that many election boxes and each election box have a serial number where the value should be entered. The each election box is filled with number of political party and for each political party how many people based on age('N' number of boxes and ask to upload excel files). Inside election box we should be able to write political party name and number of people for each political party should be in excel format.

回答 (1 件)

Cris LaPierre
Cris LaPierre 2024 年 3 月 27 日
編集済み: Cris LaPierre 2024 年 3 月 29 日
You will likely find the App Building Onramp extremely helpful in getting started with this project. It's free, interactive, and takes about 1 hour to complete.
  3 件のコメント
Cris LaPierre
Cris LaPierre 2024 年 3 月 27 日
Please shaer what you have tried already.
Vahini Polishetty
Vahini Polishetty 2024 年 3 月 29 日
Very sorry for the delayed relpy Cris. Here is the code. Please help
function EnterButtonPushed(app, event)
numElectionBoxes = app.NumberofElectionBoxesEditField.Value;
app.ElectionBoxes = zeros(1, numElectionBoxes);
app.Party = cell(1, numElectionBoxes);
app.People = cell(numElectionBoxes, 1);
% Get temperature values
for i = 1:numElectionBoxes
prompt = sprintf('Enter ElectionBox %d (K):', i);
app.ElectionBoxes(i) = str2double(inputdlg(prompt));
% Get number of SOC values for each temperature
numParty = str2double(inputdlg(sprintf('Enter number of Party values for ElectionBox %d:', i)));
app.PartyValues{i} = zeros(1, numParty);
app.NumPeople{i} = zeros(1, numParty);
% Get SOC values and number of cells for each SOC
for j = 1:numParty
app.PartyValues{i}(j) = str2double(inputdlg(sprintf('Enter Party value %d for ElectionBox %d (%%):', j, i)));
app.NumPeople{i}(j) = str2double(inputdlg(sprintf('Enter number of People for ElectionBox %d and Party %d:', i, j)));
end
end
% Update table
app.data = {};
for i = 1:numElectionBoxes
for j = 1:length(app.PartyValues{i})
app.data{end+1, 1} = app.ElectionBoxes(i);
app.data{end, 2} = app.PartyValues{i}(j);
app.data{end, 3} = app.NumPeople{i}(j);
end
end
app.UITable.ColumnEditable = true;
app.UITable.Data = app.data;
end
% Button pushed function: AddtotableButton
function AddtotableButtonPushed(app, event)
Temperature = app.TemperatureEditField.Value;
SOC = app.SOCEditField.Value;
Cell = app.CellEditField.Value;
nr = {Temperature SOC Cell};
app.UITable.Data = [app.data;nr];
app.data = app.UITable.Data;
end

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by