How to add three dimensional data points to MATLAB
이전 댓글 표시
I want to add 3D data points associated with spacecraft debris positions in space. Do I create a 3 x n matrix of Latitude, Longitude, Altitude? The goal is to use the multiobjective genetic algroithm to locate the maximum density of debris objects at a given point in time and plot it.
댓글 수: 6
KSSV
2020년 9월 14일
How you have the points? I mean in what format?
Timothy Turk
2020년 9월 14일
Are you asking how to create such data or how to organize data that you already have!?
The goal is very unclear.
To create such a 3D grid,
>> n = 100;
>> lat = linspace(-90,90,n);
>> lon = linspace(-180,180,n);
>> alt = linspace(0,1000,n);
>> [LA,LO,AL] = meshgrid(lat,lon,alt);
Timothy Turk
2020년 9월 15일
Adam Danz
2020년 9월 15일
Better to use logical indexing; if your data are a mx3 matrix as you show above,
ineedX = longitude >= 0 & longitude <= 90;
ineedY = latitude >= -180 & latitude <= 180;
ineedZ = altitude >= 650 & altitude <= 850;
select = ineedX & ineedY & ineedZ;
m(select, :)
Timothy Turk
2020년 9월 15일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Map Display에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!