non-integer power for a model ?

I wanna to make a program that generate a CRONE regulation system, and it use fractional power for models and I can't find how to do it

댓글 수: 6

Amit
Amit 2013년 12월 31일
can you elaborate the problem?
Mohamed
Mohamed 2013년 12월 31일
편집: Mohamed 2014년 1월 1일
Well I have a transfer function (linear model) such as:
m=1.2;
num=1;
den=[1 2];
sys=tf(num,den);
CRONE=sys^m;
It does not work because m is not an integer.
In another way, if I can do it just for an array (polynom), calculate a non integer power for an array like:
P=[1 3 6];
m=1.4; %non integer power
P^m;% (x²+3x+6)^m;
I hope I was clear, and thanks for the answer.
Image Analyst
Image Analyst 2013년 12월 31일
편집: Image Analyst 2013년 12월 31일
In the last way, what is "g"? And what is unknown? The P, the x, or the m? I also don't know what tf() is.
Mohamed
Mohamed 2014년 1월 1일
tf() is transfer function
Well g is gone, so that's good. I still don't know what is inside tf() since you didn't give the code for that function. And you still didn't answer my questions. I'm still not sure how to help. If you run your code, but fixed to use .^ instead of ^ you get this:
P=[1 3 6];
m = 1.4; %non integer power
P .^ m% (x²+3x+6)^m;
ans = 1 4.65553672174608 12.2860350664753
There are no unknowns. You have an m, you have a P, you raised P to the m power, end of story. What does this x in the comment have to do with anything???
Mohamed
Mohamed 2014년 1월 2일
well P is a polynomial P= x^2+3x+6 and I want to raise it to the m power with m=1.4; if m is an integer (m=3) P raised to the 3 power is P*P*P in matlab conv(P,conv(P,P)) , but I don't know how to raise a polynomila to a non integer power i'm sorry for my english and thnx for your help

댓글을 달려면 로그인하십시오.

답변 (2개)

Image Analyst
Image Analyst 2013년 12월 31일

0 개 추천

So you want to have a model like y = a * x .^ n. Do you know the fractional power, n, or is it an unknown? Either way, one way is to take the log of the equation which turns it into a linear equation - that's pretty common and works reasonably well, though I'm not sure if it gives you the absolute minimum sum of residuals as compared to some other non-linear method.
log(y) = log(a) + n * log(x)
yNew = aNew + n * xNew
Now it's a linear equation in the unknowns aNew and n and you can just use least squares.
Image Analyst
Image Analyst 2014년 1월 2일

0 개 추천

You're doing it right. Just assign some x over some range you care about. Then construct P and finally raise it to a power, for every P (every x value) that you have in your array:
x = linspace(3, 25, 50); % Some arbitrary x values that we want.
P = x .^ 2 + 3 * x + 6;
m = 1.4; % non integer power
output = P .^ m;
plot(x, output, 'bo-');
grid on;
% Enlarge figure to full screen.
set(gcf, 'Units', 'Normalized', 'OuterPosition', [0 0 1 1]);
Is that what you want?

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

질문:

2013년 12월 31일

답변:

2014년 1월 2일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by