• ×
    Information
    Windows update impacting certain printer icons and names. Microsoft is working on a solution.
    Click here to learn more
    Information
    Need Windows 11 help?
    Check documents on compatibility, FAQs, upgrade information and available fixes.
    Windows 11 Support Center.
  • post a message
  • ×
    Information
    Windows update impacting certain printer icons and names. Microsoft is working on a solution.
    Click here to learn more
    Information
    Need Windows 11 help?
    Check documents on compatibility, FAQs, upgrade information and available fixes.
    Windows 11 Support Center.
  • post a message
Guidelines
The HP Community is where owners of HP products, like you, volunteer to help each other find solutions.
Archived This topic has been archived. Information and links in this thread may no longer be available or relevant. If you have a question create a new topic by clicking here and select the appropriate board.
HP Recommended

Hi Maké,

I downloaded this progam but it can't do the root locus. 

HP Recommended

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...

 

 

Kind Regards !.
Have a nice day !.
@Maké (Technical Advisor Premium - HP Program Top Contributor).
Provost in HP Spanish Public Forum ... https://h30467.www3.hp.com/
HP Recommended

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!

HP Recommended

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.

 

 

Kind Regards !.
Have a nice day !.
@Maké (Technical Advisor Premium - HP Program Top Contributor).
Provost in HP Spanish Public Forum ... https://h30467.www3.hp.com/
HP Recommended

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é!!

 

Archived This topic has been archived. Information and links in this thread may no longer be available or relevant. If you have a question create a new topic by clicking here and select the appropriate board.
† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the <a href="https://www8.hp.com/us/en/terms-of-use.html" class="udrlinesmall">Terms of Use</a> and <a href="/t5/custom/page/page-id/hp.rulespage" class="udrlinesmall"> Rules of Participation</a>.