Polynomial arrays intersection and area within intersection

Hello,
I don't understand what is meant by polynomial array. I am wondering if it is as simple as what I wrote.
For part 2, I know I need to do some sort of fzero, but I'm not really sure. like fzero(f1,f2) or something along those lines.

 채택된 답변

Roger Stafford
Roger Stafford 2014년 8월 9일

3 개 추천

@Rick. What Ahmet has given you does in fact help. Your mistake lies in assuming powers for matlab's 'intersect' function that it doesn't have. If you read its documentation you will see what I mean. What you need at this point is 'roots', not 'intersect'. Does that get you going again?

댓글 수: 8

Rick
Rick 2014년 8월 9일
편집: Rick 2014년 8월 9일
Well, roots will find me the roots for the polynomial, however, I am trying to find where these two polynomials will intersect. I don't understand how to find where they will intersect. I did plot(x,polyval(f1,x)) and plot(x,polyval(f2,x)) and saw the two polynomials. I am convinced about polyval, I just don't know how to find the intersection using roots.
You're so close to getting there it hurts! Think "difference", "difference", "difference"!
roots(polyval(f1,x)-polyval(f2,x))?? That gives a large column array with imaginary numbers.
That's not the way to get the coefficients of the difference between the polynomials. You're just getting the difference between their values that way. Think what 'roots' requires as an input.
Rick, if you haven't solved your problem yet, ask yourself this question. What polynomial is it that has as its roots the three intersection points that are being sought, and what are its coefficients?
I am still confused what it's supposed to be, I didn't understand your hint.
Here is my final hint, Rick. What do you think would be the result of:
roots(f2-f1)
where f1 and f2 are the arrays referred to in part G.1 of your image.jpg ?
apparently it gives you the intersection. I don't understand how it does that, I did that command and it gave the intersection.

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

추가 답변 (1개)

Ahmet Cecen
Ahmet Cecen 2014년 8월 9일
help polyval
And the rest is your homework. Good luck.

댓글 수: 2

Rick
Rick 2014년 8월 9일
편집: Rick 2014년 8월 9일
I don't see how that helps. I don't have values for x. One thing I would like to stress is that this is supposed to be done by hand, I wouldn't even have matlab with me since this was an exam problem.
is
f1 = [0 -0.5 -3.5 4];
f2 = [-0.1 0 1.3 5];
intersect(polyval(f2,x),polyval(f1,x))
ans =
Empty matrix: 1-by-0
x=-6:0.1:12; %maybe even 0.01

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

카테고리

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

질문:

2014년 8월 9일

댓글:

2014년 8월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by