Реферат: Программная реализация модального управления для линейных стационарных систем
Order: TOrder;
j: byte;
NHalf: byte;
StartAlfa, NAlfa, dAlfa: Float;
W: Float;
begin
Order := SpinEdit_Dim.Value;
W := StrToFloat (Edit_W.Text);
case RadioGroup_RootsType.ItemIndex of
0 :StringGrid_Roots.Options := DefOptions;
1 :begin
for j := 1 to Order do
begin
StringGrid_Roots.Cells [j, 1] := FloatToStr (-W);
StringGrid_Roots.Cells [j, 2] := '0';
StringGrid_Roots.Options := DefOptions - [goEditing];
end
end;
2 :begin
dAlfa := Pi / Order;
StartAlfa := Pi/2 - dAlfa/2;
NHalf := Order div 2;
for j := 1 to NHalf do
begin
NAlfa := StartAlfa + dAlfa * j;
StringGrid_Roots.Cells [j, 1] := FloatToStr (Cos (NAlfa) * W);
StringGrid_Roots.Cells [Order - Pred (j), 1] := FloatToStr (Cos (-NAlfa) * W);
StringGrid_Roots.Cells [j, 2] := FloatToStr (Sin (NAlfa) * W);
StringGrid_Roots.Cells [Order - Pred (j), 2] := FloatToStr (Sin (-NAlfa) * W);