我想在函数中使用 matlab 函数的根。
但它不起作用。我不知道如何解决这个问题。
这是功能:
function [ roots , poles ] = pr_calc( num , den )
%PR_CALC Summary of this function goes here
% Detailed explanation goes here
poles=roots([den]);
roots=roots([num]);
end
这是错误消息:
??? At compilation, "roots" was determined to be
a variable and this
variable is uninitialized. "roots" is also a
function name and previous versions of MATLAB
would have called the function.
However, MATLAB 7 forbids the use of the same
name in the same
context as both a function and a variable.
Error in ==> pr_calc at 6
poles=roots([den]);