How to take mean of integers value?

1 Ansicht (letzte 30 Tage)
vimal kumar chawda
vimal kumar chawda am 12 Jun. 2021
I want to take mean of 5 column. How can I ? please find the attachment of the data.
  2 Kommentare
SALAH ALRABEEI
SALAH ALRABEEI am 12 Jun. 2021
Use mean(A,dir) where A is ur matrix and dir is the direction in which u r averaging. dir takes 1,or2,or3 etc values
vimal kumar chawda
vimal kumar chawda am 13 Jun. 2021
Column is the z axis and the instruments is rectangel , I am finding out the inclination and mean of inclination at each & every step. Does mean will affect any way to my final/mean inclination? Just visualise it.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Scott MacKenzie
Scott MacKenzie am 12 Jun. 2021
Bearbeitet: Scott MacKenzie am 12 Jun. 2021
You need to use braces because your data are in a table:
mean(LSinclination{:,5})
If it's just the integer values you want the mean of (as suggested in your question title), then
intLogical = mod(LSinclination{:,5},1)==0
mean(LSinclination{intLogical,5});

Weitere Antworten (0)

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Produkte


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by