What is the Len function do? It used to exist in MatLab 4.2, but now it doesn't any insight?

조회 수: 10 (최근 30일)
R11o = [R11*cos(pi/2-phi2o-nu8),R11*sin(pi/2-phi2o-nu8)];
R023o = [R023*cos(pi/phi2o), R023*sin(pi/phi2o)];
R114o = [-R114*sin(nu7-pi/2+phi3o),-R114*cos(nu7-pi/2+phi3o)];
cthet10 = dot((R11o-R023o),R114o)/(len(R11o-R023o)*len(R114o));
Lsnlo = sqrt(Len(R114o)^2+len(R11o-R023o)^2-2*len(R114o)*len(R11o-R023o)*cthet10);

채택된 답변

the cyclist
the cyclist 2022년 5월 21일
To my knowledge, there has never been a function called len() or Len() in MATLAB.
But, I wonder in your case if len() is a user-defined function, and that Len() is a typo with the first letter capitalized. MATLAB is case-sensitive, so Len() will not work in place of len().
What does
which len
which Len
give as output?
  댓글 수: 2
Sammy Patwary
Sammy Patwary 2022년 5월 21일
it is len, i just typed it wrong as Len. len is what it should be, both don't provide a input or output, and I've check the script that was handed. There is no user define functino for len(). I asumming for now to be length, till i finish typing the code out. The code is on paper atm.
John D'Errico
John D'Errico 2022년 5월 22일
Sorry. But I also do not remember a function called len (and my time using MATLAB goes back to a fair bit before that release.) You may not think it was user defined, but it probably was. Or you got it from somewhere or someone. Then when you got a new release, it is no longer defined, because len was only on the old search path for the old release.
If you have not trashed the old release directories, or they can be found from a backup, you can hopefully recover it.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by