I get this error bellow >> how can i fix it ?

1 次查看(过去 30 天)
error : getDesiredStateFromTrajectory
Not enough input arguments.
Error in getDesiredStateFromTrajectory (line 5)
coefficient = coefficient';
code :
function [desire_state] = getDesiredStateFromTrajectory(coefficient, time_stamp)
%GETDESIREDSTATEFROMTRAJECTORY Summary of this function goes here
% Detailed explanation goes here
desire_state = zeros(1, 16);
coefficient = coefficient';

采纳的回答

Chunru
Chunru 2022-9-3
getDesiredStateFromTrajectory([1 2 3 4], 123) % call the function by passing the values
ans = 1×16
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
% Use this as a local function or save in a separate file
function [desire_state] = getDesiredStateFromTrajectory(coefficient, time_stamp)
%GETDESIREDSTATEFROMTRAJECTORY Summary of this function goes here
% Detailed explanation goes here
desire_state = zeros(1, 16);
coefficient = coefficient';
end

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Workspace Variables and MAT-Files 的更多信息

产品


版本

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by