polynomials summation equation solving
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
ameen
am 7 Sep. 2015
Kommentiert: Walter Roberson
am 10 Sep. 2015
Hi There, I want to write a code to solve the following two polynomials to write them in Simulink block]
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/148826/image.png)
I have 39 values of Cn, S, t, u, v for the first polynomial and 47 values for the same variable for the second polynomial. Many Thanks in advance.
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 7 Sep. 2015
You cannot use a Polynomial block for those because those are not polynomials. Polynomials do not raise values to powers that are variables.
I think you will need to use a MATLAB Function Block.
4 Kommentare
Walter Roberson
am 10 Sep. 2015
You would not need a "for" loop to do it. I coded as a vectorized expression that should be fine as long as all of the elements are either scalar or the same length. If some of the arrays might be longer you can index them at the length you want. For example,
N = 37;
K = sum( C(1:N) .* J.^S(1:N) .* (P./D).^t(1:N) .* (AE./A0).^u(1:N) .* z.^v(1:N) );
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Polynomials finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!