Error in equallystrong (line 8) result = equallystrong(yourLeft, yourRight, friendsLeft, friendsRight);

1 次查看(过去 30 天)
something is wrong with my code pls help asap
Heres the code
testRun = input("Enter test run number: ");
yourLeft = input("Enter your left arm's lifting capability: ");
yourRight = input("Enter your right arm's lifting capability: ");
friendsLeft = input("Enter your friend's left arm's lifting capability: ");
friendsRight = input("Enter your friend's right arm's lifting capability: ");
% Check if equally strong
result=equallystrong(yourLeft, yourRight, friendsLeft, friendsRight);
% Display result
if result
disp("Test run " + testRun + ": True");
else
disp("Test run " + testRun + ": False");
end
  11 个评论

请先登录,再进行评论。

回答(1 个)

Neeraj
Neeraj 2023-5-15
Hello,
As per my understanding you are getting the error: Unrecognized function or variable 'equallystrong'.
As the error states, MATLAB is unable to find the function 'equallystrong'.
This issue might be caused if the function file has a different name than the function name. So rename the file where the function is declared to 'equallystrong.m'. Refer to the below link.
Ensure that the function file is on MATLAB search path. Refer to the below links for more details on MATLAB search path.

类别

Help CenterFile Exchange 中查找有关 Call C++ from MATLAB 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by