user36036
user36036

Reputation: 137

How to calculate median of variables?

suppose i have few variables a, b, c, and d have some numerical values. How can I calculate their median in MATLAB?

x= median(a,b,c,d); is not working.

Note: a, b, c, and d are variables defined by a few equations and have numerical values.

Upvotes: 1

Views: 106

Answers (1)

Ofer Fridman
Ofer Fridman

Reputation: 61

median is expecting a vector:

x= median([a,b,c,d]);

Upvotes: 2

Related Questions