"solve" inside a programm
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
"solve" inside a programm
hello everyone, let's see if you can help me. It turns out that I want to plot a root locus.
It turns out that I have to solve the equation [1+ K G(s)* H(s)= 0] for each K.
For a given K I can do it with solve: for example:
G(s):=10/(s^2+2*s+10) and H(s):=5/(s+5) for a k:=3 gives me the following result.
R:[-7.75;0.375-5.07i;0.375+5.07i]
how do I get the same within a program by varying k by different values?
- Labels:
-
Programming
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You could use a numeric solve block with "find" and turn it into a function dependent on k and then call this function (as every other function) from within your program.
A numeric solve block will only give you just one solution depending on the guess value provided.
If you need all three solutions and you used the symbolic "solve" command, you can try to turn this symbolic evaluation into a function of k.
Here in Mathcad 15:
For further help you will have to attach your worksheet and specify in more detail what exactly you need and intend to do.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
And if you have that function f(k) as Werner shows, you can plot the loci of s on the complex plane:
Success!
Luc
