Issue with Matlab fundamentals course 15.1 Creating and Calling Functions (4/6) Task 2

62 ビュー (過去 30 日間)
I am working on the Matlab fundamentals course and am experiencing issues with a problem. The answer differs from the solution provided. Here is a screen shot. Any help would be appreciated.

採用された回答

Dhanesh Alagarsamy Chinnaraja
Dhanesh Alagarsamy Chinnaraja 2022 年 10 月 10 日
I understand that the your solution differs from the one provided by the MATLAB Fundamentals course.
In Task 1, you have not created the third variable z, and had bypassed it as the second argument in the format of (y-z), which is an another method of solving the Task and an accepted solution.
All the task are evaluated on the same script, so the Tasks are not independent.
Either Task 1's solution must be changed to align with Task 2's solution or vice versa.
Here are the available options,
1. The function call to findcrossing in Task 2 must must modified as: findcrossing(t, x - y) to align with Task 1's solution
(or)
2. The function call to findcrossing in Task 1 must must modified as: findcrossing(t, x , y0); z must be included as third variable to findcrossing; y=y-z must be added as the first line to the function definition.
Both the above methods are accepted solutions; Method 2. will match will the solution provided in the course.
  2 件のコメント
Emily
Emily 2022 年 10 月 11 日
編集済み: Emily 2022 年 10 月 11 日
Here is the issue, in order to get Task 1 correct you cannot change the variable y. So I cannot add the line y=y-z or the task comes back incorrect.
Here is the code with y=y-z. I did not finish tzerox or tzeroy, this is to illustrate that y=y-z renders the solution incorrect.
with line y=y-z
Here is the accepted answer for Task 1:
Accepted Answer Task 1
Here is the accepted answser for Task 2:
Accepted Answer Task 2
Jorge Luis Argel Pacheco
Jorge Luis Argel Pacheco 2022 年 10 月 22 日
Gracias este si es la respuesta

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by