-
×InformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center. -
-
×InformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center. -
- HP Community
- Archived Topics
- Tablets and Mobile Devices Archive
- PROGRAM FOR HP PRIME

Create an account on the HP Community to personalize your profile and ask a question

12-02-2015 06:06 AM - edited 12-02-2015 02:44 PM
Hi!, bmnr:
I'm not entirely sure, but you can try, with ...
EXPORT Root_locus( )
BEGIN
LOCAL A:=(X-1), B:=(X^2+2*X+5),I,L,J,G,K,N;
// A and B, is an examples EQN
LOCAL TF,TFI,TFF,TF1;
purge(L1,L2,L3,L4,L5);
TFF:=CAS.cZeros(B);
TFI:=mat2list(TFF);
TF:=EDITLIST(TFI);
PRINT(TF);
N:=SIZE(TF);
PRINT(N);
G:=1;
FOR K FROM 1 TO 50 STEP 0.1 DO
TF1:=CAS.cZeros(B+K*A);
PRINT(TF1);
IF N = 1 THEN L1(G):=[RE(TF1(1)),IM(TF1(1))]; END ;
IF N = 2 THEN
L1(G):=[RE(TF1(1)),IM(TF1(1))];
L2(G):=[RE(TF1(2)),IM(TF1(2))] END;
IF N = 3 THEN
L1(G):=[RE(TF1(1)),IM(TF1(1))];
L2(G):=[RE(TF1(2)),IM(TF1(2))];
L3(G):=[RE(TF1(3)),IM(TF1(3))] END ;
IF N = 4 THEN
L1(G):=[RE(TF1(1)),IM(TF1(1))];
L2(G):=[RE(TF1(2)),IM(TF1(2))];
L3(G):=[RE(TF1(3)),IM(TF1(3))];
L4(G):=[RE(TF1(4)),IM(TF1(4))] END ;
IF N = 5 THEN
L1(G):=[RE(TF1(1)),IM(TF1(1))];
L2(G):=[RE(TF1(2)),IM(TF1(2))];
L3(G):=[RE(TF1(3)),IM(TF1(3))];
L4(G):=[RE(TF1(4)),IM(TF1(4))];
L5(G):=[RE(TF1(5)),IM(TF1(5))] END ;
G:=G+1;
END;
PRINT();
RETURN([[L1],[L2],[L3],[L4],[L5]]);
END;
With Wolfram Alpha, you can see ... http://m.wolframalpha.com/input/?i=root+locus+plot+for+transfer+function+%28X-1%29%2F%28X%5E2%2B2X%2...
Have a nice day !.
@Maké (Technical Advisor Premium - HP Program Top Contributor).
Provost in HP Spanish Public Forum ... https://h30467.www3.hp.com/
12-06-2015 02:08 AM
Hi Maké,
thank you fpr the progam.
I tried to use all types of app whith this progamm in CAS but a I can't make tha chart. For insert A and B how can i do? In your code you insert A and B; how can I do change them?
thanks!
12-06-2015 06:55 AM - edited 12-06-2015 06:57 AM
Hi!, bmnr:
The variables, for A and B, you can change editing, in the program.
If you needed, you can change, in the top, of program, as ... EXPORT Root_locus(A,B)
And then write, other diferent's variables.
Have a nice day !.
@Maké (Technical Advisor Premium - HP Program Top Contributor).
Provost in HP Spanish Public Forum ... https://h30467.www3.hp.com/
12-06-2015 01:11 PM
HI Maké,
I modified your programm as you said. I type in CAS "Root_locus([1,2],[5])" to say A = x+2, B=5 , then I press ENTER and it appears TFI and a rectangle like as Excel. This appens with your code and with the code with EXPORT Root_locus(A,B) even if I type only " Root_locus() ".
Thanks Maké!!
- « Previous
- Next »
