please any one help me.i can not understand where is the problem here in last line

1 回表示 (過去 30 日間)
function [newXY] = MinuOrigin_TransAll(real_end,k)
theta = real_end(k,3);
if theta <0
theta1=2*pi+theta;
end;
theta1=pi/2-theta;
rotate_mat=[cos(theta1),-sin(theta1),0;sin(theta1),cos(theta1),0;0,0,1];
toBeTransformedPointSet = real_end';
tonyTrickLength = size(toBeTransformedPointSet,2);
pathStart = real_end(k,:)';
translatedPointSet = toBeTransformedPointSet - pathStart(:,ones(1,tonyTrickLength));
newXY = rotate_mat*translatedPointSet;
for i=1:tonyTrickLength
if or(newXY(3,i)>pi,newXY(3,i)<-pi)
newXY(3,i) = 2*pi - sign(newXY(3,i))*newXY(3,i);
end;
end;
error showing:
Error: File: fingerprintmatching.m Line: 372 Column: 1
All functions in a script must be closed with an 'end'.

採用された回答

Walter Roberson
Walter Roberson 2020 年 4 月 22 日
You need to add one more
end
to the bottom of the function.
When you include a function inside a script, it is required that you have an end statement that matches the function line.
function whatever
some code
end
  4 件のコメント
indrani dalui
indrani dalui 2020 年 4 月 22 日
dear sir ,
i attached the total code .i am not find out where the problem is arrised .if possible please help me out with the solution.
Walter Roberson
Walter Roberson 2020 年 4 月 22 日
Improved version attached.
However, it is obvious that this is not the original code. A number of the functions there are not called within the code, and it is not possible for code outside of the file to call those functions. Either there was more code at the top of this, or else those functions should be written to individual .m files.
The code you sent also could not have produced the error message that you originally posted about.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by