please do this in MATLAB

pls follow all requirements, you can try to do the extra credit but that part isnt necessary. thank you!

Community Answer

Note: For indentation of the code follow the bellow screenshots of the program. Kindly remove the extra line space in both programs than it will execute perfectly. Refer the screenshots to indent the code in your editor. Screenshots of the program:     Sample output: InputEnter k angle in degrees:45 Dialog buttonsSelect the sine, cosine, or sinhsinecosinesinh click on sine button ≫ taylor_seriesTylor_series_sine =0.7071 and Trig sine =0.7071 ContinueDo you want to continue..Yes Stop click on yes InputEnter k angle in degrees:45 Dialog buttonsSelect the sine, cosine, or sinhsinecosinesinh click on cosine button ≫ taylor seriesTylor series_sine =0.7071 and Trig sine =0.7071Tylor series coine =0.7071 and Trig cos =0.7071 ContinueDo you want to continue..Yes Stop click on yes InputEnter k angle in degrees:45 Dialog buttonsSelect the sine, cosine, or sinhsinecosinesinh click on sinh button ≫ taylor_seriesTylor_series_sine =0.7071 and Trig sine =0.7071Tylor series coine =0.7071 and Trig cos=0.7071Tylor series sinh =1.0833 and Trig sinh =0.8687 Click on stop to exit ContinueDo you want to continue..Yes Stop   Code to copy:     Tylor_series.m: warning off; while (1)     %read k value from the user     in = inputdlg('Enter k angle in degrees: ','Input',[1 40]);     %user dialog buttons     choice = questdlg('Select the sine, cosine, or sinh', ...     'Dialog buttons','sine','cosine','sinh','stop');       % Handle response      k = str2num(in{1});     %convverting fron degree to radian     r = k * pi/180;      %check the user choice    switch choice        case 'sine'            %call function Tylor_series_sine            T = Tylor_series_sine(r);            %call Trig sin funcion for comparision            s = sin(r);            fprintf('Tylor_series_sine = %1.4f ',T)            fprintf('and Trig sine = %1.4fn',s);        case 'cosine'            %call function Tylor_series_sinh            T = Tylor_series_cosine(r);            %call Trig cos funcion for comparision            s = cos(r);            fprintf('Tylor series coine = %1.4f ',T)            fprintf('and Trig cos = %1.4fn', s);    ... See the full answer