struct

Преобразуйте географический или планарный вектор в скалярную структуру

Синтаксис

Описание

пример

s = struct(v) преобразует географический или планарный вектор v в скалярную структуру, s.

Примеры

свернуть все

Создайте вектор madboint.

mp = mappoint(shaperead('tsunamis'))
mp = 
 162x1 mappoint vector with properties:

 Collection properties:
       Geometry: 'point'
       Metadata: [1x1 struct]
 Feature properties:
              X: [1x162 double]
              Y: [1x162 double]
           Year: [1x162 double]
          Month: [1x162 double]
            Day: [1x162 double]
           Hour: [1x162 double]
         Minute: [1x162 double]
         Second: [1x162 double]
       Val_Code: [1x162 double]
       Validity: {1x162 cell}
     Cause_Code: [1x162 double]
          Cause: {1x162 cell}
         Eq_Mag: [1x162 double]
        Country: {1x162 cell}
       Location: {1x162 cell}
     Max_Height: [1x162 double]
       Iida_Mag: [1x162 double]
      Intensity: [1x162 double]
     Num_Deaths: [1x162 double]
    Desc_Deaths: [1x162 double]

Преобразуйте вектор maspoint в структуру.

s = struct(mp)
s = struct with fields:
       Geometry: 'point'
       Metadata: [1x1 struct]
              X: [1x162 double]
              Y: [1x162 double]
           Year: [1x162 double]
          Month: [1x162 double]
            Day: [1x162 double]
           Hour: [1x162 double]
         Minute: [1x162 double]
         Second: [1x162 double]
       Val_Code: [1x162 double]
       Validity: {1x162 cell}
     Cause_Code: [1x162 double]
          Cause: {1x162 cell}
         Eq_Mag: [1x162 double]
        Country: {1x162 cell}
       Location: {1x162 cell}
     Max_Height: [1x162 double]
       Iida_Mag: [1x162 double]
      Intensity: [1x162 double]
     Num_Deaths: [1x162 double]
    Desc_Deaths: [1x162 double]

Входные параметры

свернуть все

Географический или планарный вектор, заданный как geopoint, geoshape, mappoint, или mapshape объект.

Выходные аргументы

свернуть все

Структура, представляющая географический или планарный вектор, возвращенная как скалярная структура.

См. также

|

Введенный в R2012a