Info

This question is closed. Reopen it to edit or answer.

How do i debug this problem?

1 view (last 30 days)
Waqar Khan
Waqar Khan on 2 May 2015
Closed: MATLAB Answer Bot on 20 Aug 2021
The code is giving multiple errors: _ 1-This call-site passes more inputs to this function than it can accept.
2-Errors occurred during parsing of MATLAB function
function [us_ref, theta1_new] = scalar(w1_ref,theta1,psis_ref,Ts)
fsw=4000; %fsw=1/2*Ts
Ts=0.000125;
psis_ref=0.95; %given
us_ref= complex(0,0);
theta1_new=0;
for a=1
us_ref = (psis_ref*w1_ref)*(cos(theta1)+1*j(sin(theta1)))
theta1_new = theta1 + Ts*w1_ref;
end
Please help

Answers (1)

Image Analyst
Image Analyst on 2 May 2015
Here's some help: http://www.mathworks.com/matlabcentral/answers/6200-tutorial-how-to-ask-a-question-on-answers-and-get-a-fast-answer In there it will suggest things to help us help you, like including the full error messages, and letting us know all the code, like especially the line of code where you called that function. And be sure to let us know what the values of the arguments were when you called it.

Community Treasure Hunt

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

Start Hunting!