Struggling with CAS programming
|
09-17-2018, 12:54 AM
(This post was last modified: 09-17-2018 12:57 AM by rushfan.)
Post: #1
|
|||
|
|||
Struggling with CAS programming
I wrote a program to calculate the state space form a transfer function. It works a bit like the Matlab tf2ss function, but return state space in canonical phase form. It receives a vector num and a vector den, and returns 4 matrices A B C D. I managed to make it work line by line in the CAS mode, but when I run it as a CAS function, it does not work.
Code:
When I run the function with tf2ss([1 2 3 4], [1 2 3 4 5]) I receive "Error: Invalid Input". I haven't been able to figure out what is wrong with the code. Documentation is sparse and hard to find. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)