can someone help me determine what's wrong with my code?
現在この質問をフォロー中です
- フォローしているコンテンツ フィードに更新が表示されます。
- コミュニケーション基本設定に応じて電子メールを受け取ることができます。
エラーが発生しました
ページに変更が加えられたため、アクションを完了できません。ページを再度読み込み、更新された状態を確認してください。
古いコメントを表示
採用された回答
madhan ravi
2018 年 11 月 3 日
編集済み: madhan ravi
2018 年 11 月 3 日
f=@(x) (x.^3-3.*x.^2-4.*x+12)./(x-2) ; % Insert function f here
g=@(x) (x.^2-4.*x)./abs(x-4) ; % Insert function g here
x=[1.5:0.01:2.5]; % Refer to Step 2 above for the next 3 lines
y1=f(x);
figure
fp=plot(x,y1);
title('Graph of f'); % DO NOT CHANGE COMMAND ON THIS LINE figure; % DO NOT CHANGE COMMAND ON THIS LINE
x=[3.5:0.01:4.5]; % Refer to Step 4 above for the next 3 lines
figure
y2=g(x);
gp=plot(x,y2);
title('Graph of g'); % DO NOT CHANGE COMMAND ON THIS LINE
10 件のコメント
Maryam AlKhoury
2018 年 11 月 3 日
how do i do that? i'm new to this..
madhan ravi
2018 年 11 月 3 日
編集済み: madhan ravi
2018 年 11 月 3 日
Whats your error message , everything should be fine ? Copy your code and paste it here we can’t test your image
Maryam AlKhoury
2018 年 11 月 3 日
f=@(x) (x.^3-3*x.^2-4*x+12)/(x-2) ; % Insert function f here g=@(x) (x.^2-4*x)/abs(x-4) ; % Insert function g here x=[1.5:0.01:2.5]; % Refer to Step 2 above for the next 3 lines y1=x; fp=plot(x,y1); title('Graph of f'); % DO NOT CHANGE COMMAND ON THIS LINE figure; % DO NOT CHANGE COMMAND ON THIS LINE x=[3.5:0.01:4.5]; % Refer to Step 4 above for the next 3 lines y2=x; gp=plot(x,y2); title('Graph of g'); % DO NOT CHANGE COMMAND ON THIS LINE
madhan ravi
2018 年 11 月 3 日
use .* and ./ instead of * and /
madhan ravi
2018 年 11 月 3 日
see edited answer
madhan ravi
2018 年 11 月 3 日
編集済み: madhan ravi
2018 年 11 月 3 日
did it work out? If it did make sure to accept the answer so that people know the question is solved else let know
Maryam AlKhoury
2018 年 11 月 3 日
I tried that but it still says that the code isn't right.
Maryam AlKhoury
2018 年 11 月 3 日
.
Maryam AlKhoury
2018 年 11 月 3 日
oh never mind it worked!! thanks alot!!
madhan ravi
2018 年 11 月 3 日
Anytime!
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Get Started with MATLAB についてさらに検索
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の 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)
