Can someone help me with this assignment?
이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
이전 댓글 표시
0 개 추천
i'm using MatLab grader
댓글 수: 2
Rik
2018년 11월 10일
Have a read here (or here for more general advice) and here. It will greatly improve your chances of getting an answer. You can find guidelines for posting homework on this forum here.
Maryam AlKhoury
2018년 11월 10일
편집: madhan ravi
2018년 11월 10일
fa=@(x) (2.*x.^3+3.*x.^2-6.*x+19)./(7.*x.^3-20.*x-5); % define the function for part (a)-REMEMBER to use element-by-element operations (.* ./ .^)
x=[-10 -100 -1000 -10000 -100000 -1000000 -10000000]; % define the vector x
ya=f(x) % calculate f(x) (No semicolon to see output)
syms x; % DO NOT CHANGE CODE ON THIS LINE
aLimit=limit( ) % No semicolon
% Repeat the above process for part (b)
fb=@(x) sqrt(4.*x.^2+7.*x+1)-2.*x;
x=[10 100 1000 10000 100000 1000000 10000000];
yb=f(x)
syms x;
bLimit=limit( )
this is my code... i dont know how to choose the values of x and what to write in "ya= "
채택된 답변
madhan ravi
2018년 11월 10일
편집: madhan ravi
2018년 11월 17일
fa=@(x) (2.*x.^3+3.*x.^2-6.*x+19)./(7.*x.^3-20.*x-5); % define the function for part (a)-REMEMBER to use element-by-element operations (.* ./ .^)
x=[-10 -100 -1000 -10000 -100000 -1000000 -10000000]; % define the vector x
ya=fa(x) % calculate f(x) (No semicolon to see output)
syms x; % DO NOT CHANGE CODE ON THIS LINE
aLimit=limit((2.*x.^3+3.*x.^2-6.*x+19)./(7.*x.^3-20.*x-5),x,-inf ) % No semicolon
% Repeat the above process for part (b)
fb=@(x) sqrt(4.*x.^2+7.*x+1)-2.*x;
x=[10 100 1000 10000 100000 1000000 10000000];
yb=fb(x)
syms x;
bLimit=limit( sqrt(4.*x.^2+7.*x+1)-2.*x,x,inf)
command window:
>> COMMUNITY
ya =
0.2382 0.2814 0.2853 0.2857 0.2857 0.2857 0.2857
aLimit =
2/7
yb =
1.7025 1.7449 1.7495 1.7499 1.7500 1.7500 1.7500
bLimit =
7/4
>>
댓글 수: 22
madhan ravi
2018년 11월 10일
Rik
2018년 11월 10일
@Madhan, congratulations for reaching the 2k rep level, especially in such a short time.
madhan ravi
2018년 11월 10일
@Rik thank you very much :)
Maryam AlKhoury
2018년 11월 17일
it says that there's an error at line 3 ya=f(x)
Try
clear all %at the very beginning
and try again
I got the result!
madhan ravi
2018년 11월 17일
see edited answer
Maryam AlKhoury
2018년 11월 17일
i tried that but i still get the same error
madhan ravi
2018년 11월 17일
편집: madhan ravi
2018년 11월 17일
upload the code that you are trying , did you try my answer ?
Maryam AlKhoury
2018년 11월 17일
i tried substituting values for ya and yb and this is what i got
madhan ravi
2018년 11월 17일
i edited my answer please try again
Maryam AlKhoury
2018년 11월 17일
i got the same answer as you but for some reason i got this error:
madhan ravi
2018년 11월 17일
please upload the code that you are trying becausse you should be getting any error
fa=@(x) (2.*x.^3+3.*x.^2-6.*x+19)./(7.*x.^3-20.*x-5) ; % define the function for part (a)-REMEMBER to use element-by-element operations (.* ./ .^)
x=[-10 -100 -1000 -10000 -100000 -1000000 -10000000]; % define the vector x
ya=fa(x) % calculate f(x) (No semicolon to see output)
syms x; % DO NOT CHANGE CODE ON THIS LINE
aLimit=limit((2.*x.^3+3.*x.^2-6.*x+19)./(7.*x.^3-20.*x-5),x,-inf) % No semicolon
% Repeat the above process for part (b)
fb=@(x) sqrt(4.*x.^2+7.*x+1)-2.*x;
x=[10 100 1000 10000 100000 1000000 10000000];
yb=fb(x)
syms x;
bLimit=limit(sqrt(4.*x.^2+7.*x+1)-2.*x,x,inf)
Maryam AlKhoury
2018년 11월 17일
and this is my output:
ya =
0.2382 0.2814 0.2853 0.2857 0.2857
aLimit =
2/7
yb =
1.7025 1.7449 1.7495 1.7499 1.7500
bLimit =
7/4
madhan ravi
2018년 11월 17일
편집: madhan ravi
2018년 11월 17일
This is my output when i tried your answer , your getting error because you should be getting 7 elements but instead your are getting 5
>> COMMUNITY
ya =
0.2382 0.2814 0.2853 0.2857 0.2857 0.2857 0.2857
aLimit =
2/7
yb =
1.7025 1.7449 1.7495 1.7499 1.7500 1.7500 1.7500
bLimit =
7/4
>>
or try
format longg
at the very beginning of your code
Maryam AlKhoury
2018년 11월 17일
this is my output (7 elements) but i still get an error:
ya =
0.2382 0.2814 0.2853 0.2857 0.2857 0.2857 0.2857
aLimit =
2/7
yb =
1.7025 1.7449 1.7495 1.7499 1.7500 1.7500 1.7500
bLimit =
7/4
madhan ravi
2018년 11월 17일
You have met all the requirements but why is it showing an error?
Maryam AlKhoury
2018년 11월 17일
yeah i dont know
madhan ravi
2018년 11월 17일
Better ask your teacher maybe he has set an unique algorithm ?
Maryam AlKhoury
2018년 11월 17일
yeah okay.. thanks anyways for your help
madhan ravi
2018년 11월 17일
Glad could help upto a certain , not satisfied though
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 MATLAB Mobile Fundamentals에 대해 자세히 알아보기
태그
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
