perturb
설명
는 offsets = perturb(obj)obj 객체에 정의된 섭동을 적용하고 오프셋 값을 반환합니다. 객체에 대한 섭동은 perturbations 함수를 사용하여 정의할 수 있습니다.
예제
insSensor 객체를 만듭니다.
sensor = insSensor
sensor =
insSensor with properties:
MountingLocation: [0 0 0] m
RollAccuracy: 0.2 deg
PitchAccuracy: 0.2 deg
YawAccuracy: 1 deg
PositionAccuracy: [1 1 1] m
VelocityAccuracy: 0.05 m/s
AccelerationAccuracy: 0 m/s²
AngularVelocityAccuracy: 0 deg/s
TimeInput: 0
RandomStream: 'Global stream'
RollAccuracy 속성에 대한 섭동을 각각 동일한 확률을 갖는 3개의 값으로 정의합니다.
values = {0.1 0.2 0.3}values=1×3 cell array
{[0.1000]} {[0.2000]} {[0.3000]}
probabilities = [1/3 1/3 1/3]
probabilities = 1×3
0.3333 0.3333 0.3333
perturbations(sensor,'RollAccuracy','Selection',values,probabilities)
ans=7×3 table
Property Type Value
_________________________ ___________ ______________________________________
"RollAccuracy" "Selection" {1×3 cell} {[0.3333 0.3333 0.3333]}
"PitchAccuracy" "None" {[ NaN]} {[ NaN]}
"YawAccuracy" "None" {[ NaN]} {[ NaN]}
"PositionAccuracy" "None" {[ NaN]} {[ NaN]}
"VelocityAccuracy" "None" {[ NaN]} {[ NaN]}
"AccelerationAccuracy" "None" {[ NaN]} {[ NaN]}
"AngularVelocityAccuracy" "None" {[ NaN]} {[ NaN]}
perturb 함수를 사용하여 sensor 객체를 섭동합니다.
rng(2020) perturb(sensor); sensor
sensor =
insSensor with properties:
MountingLocation: [0 0 0] m
RollAccuracy: 0.5 deg
PitchAccuracy: 0.2 deg
YawAccuracy: 1 deg
PositionAccuracy: [1 1 1] m
VelocityAccuracy: 0.05 m/s
AccelerationAccuracy: 0 m/s²
AngularVelocityAccuracy: 0 deg/s
TimeInput: 0
RandomStream: 'Global stream'
RollAccuracy가 0.5도로 섭동됩니다.
입력 인수
섭동할 객체로, 객체로 지정됩니다. 섭동할 수 있는 객체에는 다음이 포함됩니다.
출력 인수
속성 오프셋으로, 구조체로 구성된 배열로 반환됩니다. 각 구조체에는 다음과 같은 필드가 포함되어 있습니다.
| 필드 이름 | 설명 |
|---|---|
Property | 섭동된 속성 이름 |
Offset | 섭동에 적용된 오프셋 값 |
PerturbedValue | 섭동 후의 속성값 |
버전 내역
R2024a에 개발됨
참고 항목
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)