function [LPFitindx,LPFitindxGeneral,LPFitlist,LPFitlistGeneral,LPtf1,LPtf2,LPfittypeindx] = LPFitlistfun
LPFitlistGeneral={'PolyX','ExponentialX','FourierX','GaußianX','PowerX','RationalX_X','Weibull','InterpolantX','Sum of SineX','Custom_not_working'};
[LPFitindxGeneral,LPtf1]=listdlg('ListString',LPFitlistGeneral,'PromptString','Select Degree','Name','PolyX','SelectionMode','single','ListSize',[160 145])
switch LPFitindxGeneral
case 1
LPFitlist={'Poly1','Poly2','Poly3','Poly4','Poly5','Poly6','Poly7','Poly8','Poly9'};
[LPFitindx, LPtf2]=listdlg('ListString',LPFitlist,'PromptString','Select Fittype','Name','Fittype-Selection','SelectionMode','Single','ListSize',[160 130]);
switch LPFitindx
case 1
LPfittypeindx=1
case 2
LPfittypeindx=2
case 3
LPfittypeindx=3
case 4
LPfittypeindx=4
case 5
LPfittypeindx=5
case 6
LPfittypeindx=6
case 7
LPfittypeindx=7
case 8
LPfittypeindx=8
case 9
LPfittypeindx=9
end
case 2
LPFitlist={'Exponential_1','Exponential_2'};
[LPFitindx, LPtf2]=listdlg('ListString',LPFitlist,'PromptString','Select Fittype','Name','Fittype-Selection','SelectionMode','Single','ListSize',[160 130])
switch LPFitindx
case 1
LPfittypeindx=10
case 2
LPfittypeindx=11
end
case 3
LPFitlist={'Fourier1','Fourier2','Fourier3','Fourier4','Fourier5','Fourier6','Fourier7','Fourier8'};
[LPFitindx, LPtf2]=listdlg('ListString',LPFitlist,'PromptString','Select Fittype','Name','Fittype-Selection','SelectionMode','Single','ListSize',[160 130])
switch LPFitindx
case 1
LPfittypeindx=12
case 2
LPfittypeindx=13
case 3
LPfittypeindx=14
case 4
LPfittypeindx=15
case 5
LPfittypeindx=16
case 6
LPfittypeindx=17
case 7
LPfittypeindx=18
case 8
LPfittypeindx=19
end
case 4
LPFitlist={'Gaussian1','Gaussian2','Gaussian3','Gaussian4','Gaussian5','Gaussian6','Gaussian7','Gaussian8'};
[LPFitindx, LPtf2]=listdlg('ListString',LPFitlist,'PromptString','Select Fittype','Name','Fittype-Selection','SelectionMode','Single','ListSize',[160 130])
switch LPFitindx
case 1
LPfittypeindx=20
case 2
LPfittypeindx=21
case 3
LPfittypeindx=22
case 4
LPfittypeindx=23
case 5
LPfittypeindx=24
case 6
LPfittypeindx=25
case 7
LPfittypeindx=26
case 8
LPfittypeindx=27
end
case 5
LPFitlist={'Power1','Power2'};
[LPFitindx, LPtf2]=listdlg('ListString',LPFitlist,'PromptString','Select Fittype','Name','Fittype-Selection','SelectionMode','Single','ListSize',[160 130])
switch LPFitindx
case 1
LPfittypeindx=28
case 2
LPfittypeindx=29
end
case 6
LPFitlist={'0','1','2','3','4','5'};
[LPFitindx, LPtf2]=listdlg('ListString',LPFitlist,'PromptString','Select Numerator Degree','Name','Rational Numerator','SelectionMode','Single','ListSize',[160 130])
switch LPFitindx
case 1
Denominatorlist={'1','2','3','4','5'};
[Denominatorindx, tf3]=listdlg('ListString',Denominatorlist,'PromptString','Select Denominator Degree','Name','Rational Denominator','SelectionMode','Single','Listsize',[160 130])
answer=questdlg('"You`re still here?"')
clear answer
switch Denominatorindx
case 1
LPfittypeindx=30
case 2
LPfittypeindx=31
case 3
LPfittypeindx=32
case 4
LPfittypeindx=33
case 5
LPfittypeindx=34
end
case 2
Denominatorlist={'1','2','3','4','5'};
[Denominatorindx, tf3]=listdlg('ListString',Denominatorlist,'PromptString','Select Denominator Degree','Name','Rational Denominator','SelectionMode','Single','Listsize',[160 130])
answer=questdlg('"A feeling of dread hangs over you... But you stay determined."')
clear answer
switch Denominatorindx
case 1
LPfittypeindx=35
case 2
LPfittypeindx=36
case 3
LPfittypeindx=37
case 4
LPfittypeindx=38
case 5
LPfittypeindx=39
end
case 3
Denominatorlist={'1','2','3','4','5'};
[Denominatorindx, tf3]=listdlg('ListString',Denominatorlist,'PromptString','Select Denominator Degree','Name','Rational Denominator','SelectionMode','Single','Listsize',[160 130])
answer=questdlg('"The waterfall here seems to flow from the ceiling of the cavern.Occasionally, a piece of trash will flow through and fall into the bottomless abyss below. Viewing this endless cycle of worthless garbage. It fills you with determination."')
clear answer
switch Denominatorindx
case 1
LPfittypeindx=40
case 2
LPfittypeindx=41
case 3
LPfittypeindx=42
clear answer
answertoallquestions=questdlg('Is this the answer to all questions?','42');
switch answertoallquestions
case 'Yes'
disp('I see...')
clear answertoallquestions
disp('You have chosen ......')
disp('wisely')
pause(10)
case 'No'
clc;
clear all
close all
disp('wrong answer.')
case 'Cancel'
clc;
close all
answertoallquestions2=questdlg('Are you sure you wanna cancel? I''d rather agree if I''d be you','Is it the answer?')
switch answertoallquestions2
case 'Yes'
clear all
case 'No'
disp('...wise decision')
case 'Cancel'
disp('...wise decision')
end
end
case 4
LPfittypeindx=43
case 5
LPfittypeindx=44
end
case 4
Denominatorlist={'1','2','3','4','5'};
[Denominatorindx, tf3]=listdlg('ListString',Denominatorlist,'PromptString','Select Denominator Degree','Name','Rational Denominator','SelectionMode','Single','Listsize',[160 130])
answer=questdlg('"Partaking in useless garbage fills you with determination."')
clear answer
switch Denominatorindx
case 1
LPfittypeindx=45
case 2
LPfittypeindx=36
case 3
LPfittypeindx=47
case 4
LPfittypeindx=48
case 5
LPfittypeindx=49
end
case 5
Denominatorlist={'1','2','3','4','5'};
[Denominatorindx, tf3]=listdlg('ListString',Denominatorlist,'PromptString','Select Denominator Degree','Name','Rational Denominator','SelectionMode','Single','Listsize',[160 130])
answer=questdlg('"but you didn`t get this far by giving up, did you? that`s right. you have something called `determination´. so as long as you hold on.. so long as you do what`s in your heart.. i believe you can do the right thing."')
clear answer
switch Denominatorindx
case 1
LPfittypeindx=50
case 2
LPfittypeindx=51
case 3
LPfittypeindx=52
case 4
LPfittypeindx=53
case 5
LPfittypeindx=54
end
case 6
Denominatorlist={'1','2','3','4','5'};
[Denominatorindx, tf3]=listdlg('ListString',Denominatorlist,'PromptString','Select Denominator Degree','Name','Rational Denominator','SelectionMode','Single','Listsize',[160 130])
answer=questdlg('"on days like these, kids like you... should be burning in hell."')
clear answer
switch Denominatorindx
case 1
LPfittypeindx=55
case 2
LPfittypeindx=56
case 3
LPfittypeindx=57
case 4
LPfittypeindx=58
case 5
LPfittypeindx=59
end
end
case 7
LPFitlist={'Weibull'};
[LPFitindx, LPtf2]=listdlg('ListString',LPFitlist,'PromptString','Select Fittype','Name','Fittype-Selection','SelectionMode','Single','ListSize',[160 50])
LPfittypeindx=60
case 8
LPFitlist={'Nearest Neighbor','Linear','Cupic','Shape-Preserving (PCHIP)'};
[LPFitindx, LPtf2]=listdlg('ListString',LPFitlist,'PromptString','Select Fittype','Name','Fittype-Selection','SelectionMode','Single','ListSize',[160 60])
switch LPFitindx
case 1
LPfittypeindx=61
case 2
LPfittypeindx=62
case 3
LPfittypeindx=63
case 4
LPfittypeindx=64
end
case 9
LPFitlist={'1','2','3','4','5','6','7','8'};
[LPFitindx, LPtf2]=listdlg('ListString',LPFitlist,'PromptString','Select Number of terms','Name','NofTerms-Selection','SelectionMode','Single','ListSize',[160 118])
switch LPFitindx
case 1
LPfittypeindx=65
case 2
LPfittypeindx=66
case 3
LPfittypeindx=67
case 4
LPfittypeindx=68
case 5
LPfittypeindx=69
case 6
LPfittypeindx=70
case 7
LPfittypeindx=71
case 8
LPfittypeindx=72
end
case 10
LPFitlist={'Simple','With fo in detailed code'};
[LPFitindx,LPtf2]=listdlg('ListString',LPFitlist,'PromptString','Select Degree of customosation','Name','Custom Fit','SelectionMode','Single','ListSize',[160 33])
answer=questdlg('Under construction. Need to find out how to create custom LPFits for_ single use, which will be deleted afterwards.')
switch LPFitindx
case 1
LPfittypeindx=73
disp ('This should be 73')
case 2
LPfittypeindx=74
end
end
end
댓글 수: 4
이 댓글에 대한 바로 가기 링크
https://kr.mathworks.com/matlabcentral/answers/512221-function-overwrites-output-with-a-different-number#comment_813461
이 댓글에 대한 바로 가기 링크
https://kr.mathworks.com/matlabcentral/answers/512221-function-overwrites-output-with-a-different-number#comment_813461
이 댓글에 대한 바로 가기 링크
https://kr.mathworks.com/matlabcentral/answers/512221-function-overwrites-output-with-a-different-number#comment_813484
이 댓글에 대한 바로 가기 링크
https://kr.mathworks.com/matlabcentral/answers/512221-function-overwrites-output-with-a-different-number#comment_813484
이 댓글에 대한 바로 가기 링크
https://kr.mathworks.com/matlabcentral/answers/512221-function-overwrites-output-with-a-different-number#comment_813491
이 댓글에 대한 바로 가기 링크
https://kr.mathworks.com/matlabcentral/answers/512221-function-overwrites-output-with-a-different-number#comment_813491
이 댓글에 대한 바로 가기 링크
https://kr.mathworks.com/matlabcentral/answers/512221-function-overwrites-output-with-a-different-number#comment_813547
이 댓글에 대한 바로 가기 링크
https://kr.mathworks.com/matlabcentral/answers/512221-function-overwrites-output-with-a-different-number#comment_813547
댓글을 달려면 로그인하십시오.