Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

It is Matlab, i need a complete answer. What codes do i need to assign for each

ID: 3693261 • Letter: I

Question


It is Matlab, i need a complete answer.
What codes do i need to assign for each button eo S 196 Radio Buttion Radio Bution Radio Button Edt Text Edt Text Push Buton I want to creat a Matlab app GU It is gonna be a Tuition Calculator The first box is edit text called (Tuition Calculator) Then three radio buttons boxes: First Radiobutton. Called in state student Second Radiobutton called (out state student) Third Radiobutton called (International student Two edit text boxes First called( number of credits) Second one empty so i can enter the number of credits After that a bushbutton called (Calculate) So when i enter selcet one of Radiobuttons and i enter the number of credits it gives me the total of tuition and display it in the static text Finally static text In state student pays $200 per credit Out state student pays $400 per credit International student pays $400 per credt I know how design it but i dont waht to call each tag And codes as well Bb-b17 hotmail

Explanation / Answer

function computeTutionGUI
hFig = figure('Visible','off', 'Menu','none', 'Name','Calculator', 'Resize','off', 'Position',[100 100 350 200]);
movegui(hFig,'center') %making gui to centre of scrren

studentTypeGrp = uibuttongroup('Position',[0 0 0.3 1], 'Units','Normalized');
uicontrol('Style','Radio', 'Parent',studentTypeGrp, 'HandleVisibility','off', 'Position',[15 150 70 30], 'String','inState_Student', 'Tag','+')
uicontrol('Style','Radio', 'Parent',studentTypeGrp, 'HandleVisibility','off', 'Position',[15 120 70 30], 'String','outstate_Student', 'Tag','-')
uicontrol('Style','Radio', 'Parent',studentTypeGrp, 'HandleVisibility','off', 'Position',[15 90 70 30], 'String','International', 'Tag','*')

credits = uicontrol('Style','edit', 'Position',[150 150 60 20], 'String','credits');
result = uicontrol('Style','edit', 'Position',[200 80 60 20], 'String','');

uicontrol('Style','pushbutton', 'String','Compute', 'Position',[200 50 60 25], 'Callback',{@compute_callback})

set(hFig, 'Visible','on') %making gui visible

%calculating total to be play
function compute_callback(src,ev)
totalCredits = str2double(get(credits, 'String'));
switch get(get(studentTypeGrp,'SelectedObject'),'Tag')
case 'inState_Student', res = totalCredits * 200;
case 'outstate_Student', res = totalCredits * 400;
case 'International', res = totalCredits * 400;
otherwise, res = '';
end
set(result, 'String',res)
end
end

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote