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

1 visualización (últimos 30 días)
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'.

Respuesta aceptada

Walter Roberson
Walter Roberson el 22 de Abr. de 2020
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 comentarios
indrani dalui
indrani dalui el 22 de Abr. de 2020
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 el 22 de Abr. de 2020
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.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Get Started with MATLAB en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by