91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 56KB
    文件類型: .m
    金幣: 2
    下載: 1 次
    發布日期: 2021-06-09
  • 語言: Matlab
  • 標簽: Matlab??

資源簡介

function [xy,distance,t_a] = distance2curve(curvexy,mapxy,interpmethod) % distance2curve: minimum distance from a point to a general curvilinear n-dimensional arc % usage: [xy,distance,t] = distance2curve(curvexy,mapxy) % uses linear curve segments % usage: [xy,distance,t] = distance2curve(curvexy,mapxy,interpmethod)

資源截圖

代碼片段和文件信息

function?[xydistancet_a]?=?distance2curve(curvexymapxyinterpmethod)
%?distance2curve:?minimum?distance?from?a?point?to?a?general?curvilinear?n-dimensional?arc
%?usage:?[xydistancet]?=?distance2curve(curvexymapxy)?%?uses?linear?curve?segments
%?usage:?[xydistancet]?=?distance2curve(curvexymapxyinterpmethod)
%
%?Identifies?the?closest?point?along?a?general?space?curve?(a?1-d?path
%?in?some?space)?to?some?new?set?of?points.?The?curve?may?be?piecewise
%?linear?or?a?parametric?spline?or?pchip?model.
%
%?arguments:?(input)
%??curvexy?-?An?nxp?real?numeric?array?containing?the?points?of?the
%????????curve.?For?2-dimensional?curves?p?==?2.?This?will?be?a?list
%????????of?points?(each?row?of?the?array?is?a?new?point)?that
%????????define?the?curve.?The?curve?may?cross?itself?in?space.
%????????Closed?curves?are?acceptable?in?which?case?the?first
%????????and?last?points?would?be?identical.?(Sorry?but?periodic
%????????end?conditions?are?not?an?option?for?the?spline?at?this?time.)
%
%????????Since?a?curve?makes?no?sense?in?less?than?2?dimensions
%????????p?>=?2?is?required.
%
%??mapxy?-?an?mxp?real?numeric?array?where?m?is?the?number?of?new?points
%????????to?be?mapped?to?the?curve?in?term?of?their?closest?distance.
%
%????????These?points?which?will?be?mapped?to?the?existing?curve
%????????in?terms?of?the?minimium?(euclidean?2-norm)?distance
%????????to?the?curve.?Each?row?of?this?array?will?be?a?different
%????????point.
%
%??interpmethod?-?(OPTIONAL)?string?flag?-?denotes?the?method
%????????used?to?compute?the?arc?length?of?the?curve.
%
%????????method?may?be?any?of?‘linear‘?‘spline‘?or?‘pchip‘
%????????or?any?simple?contraction?thereof?such?as?‘lin‘
%????????‘sp‘?or?even?‘p‘.
%????????
%????????interpmethod?==?‘linear‘?-->?Uses?a?linear?chordal
%???????????????approximation?to?define?the?curve.
%???????????????This?method?is?the?most?efficient.
%
%????????interpmethod?==?‘pchip‘?-->?Fits?a?parametric?pchip
%???????????????approximation.
%
%????????interpmethod?==?‘spline‘?-->?Uses?a?parametric?spline
%???????????????approximation?to?fit?the?curves.?Generally?for
%???????????????a?smooth?curve?this?method?may?be?most?accurate.
%
%????????DEFAULT:?‘linear‘
%
%?arguments:?(output)
%??xy?-?an?mxp?array?contains?the?closest?point?identified?along
%???????the?curve?to?each?of?the?points?provided?in?mapxy.
%
%??distance?-?an?mx1?vector?the?actual?distance?to?the?curve
%???????in?terms?minimum?Euclidean?distance.
%
%??t??-?fractional?arc?length?along?the?interpolating?curve?to?that
%???????point.?This?is?the?same?value?that?interparc?would?use?to
%???????produce?the?points?in?xy.
%
%
%?Example:
%?%?Find?the?closest?points?and?the?distance?to?a?polygonal?line?from
%?%?several?test?points.
%
%?curvexy?=?[0?0;1?0;2?1;0?.5;0?0];
%?mapxy?=?[3?4;.5?.5;3?-1];
%?[xydistancet]?=?distance2curve(curvexymapxy‘linear‘)
%?%?xy?=
%?%??????????????????????????2????????????????

評論

共有 條評論