matlab函数调用​显示调用中是否存在不​正确的参数数据类型或​缺少参数,但语句正确

84 views (last 30 days)
向华
向华 on 5 May 2024
Answered: Harimurali on 14 May 2024
准确说是之前出现过5201的报错,然后卸载并重装 MathWorks Service Host,但不清楚是不是中间出了什么问题,再次正常进入matlab后之前不报错的问题开始报错,matlab重装后效果一样,无法解决函数报错问题,尝试过电脑重启、windows更新

Answers (1)

Harimurali
Harimurali on 14 May 2024
Hi 向华,
由于我的母语不是中文,我将用英语回答这个问题。
"tf" function is part of the Control System Toolbox product, which is an optional product that must be licensed and installed. Follow the given steps to troubleshoot the issue you are facing:
  • Run the following command to find out which "tf" function is being called:
which -all tf
  • "MATLAB\R2022a\toolbox\control\ctrlmodels\@tf\tf.m" should be present among the results.
  • Check if Control System Toolbox is licensed and installed by using the following command:
ver control
  • Click "Adds-Ons" in the MATLAB application and download "Control Systems Toolbox", to install the Control System Toolbox if not already installed.
Hope this resolves your issue!

Tags

Products


Release

R2022a

Community Treasure Hunt

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

Start Hunting!