# How to Apply a Mathematical Equation on a Feature Collection in Google Earth Engine?

I have uploaded a table in GEE with height and diameter columns.Now I want to write a function that would apply an equation to each feature. I am unable to use a simple equation as I might have done in excel. The '.expression ' in GEE works only on images not on feature collection. Please suggest a simple method to do it.

This is the equation I want to implement : ln(AGB)=5.349+0.96*ln(D^2H)

where D is for DBH (m) and H is for height (m)

To create a computed property for a feature collection, you can map a function over it as explained here: https://developers.google.com/earth-engine/feature_collection_mapping.

In your case, this would be the code:

/***
* Computes ln(AGB)=5.349+0.96*ln(D^2H)
*/
function computeLnAGB(feature) {
var d = ee.Number(feature.get('DBH (m)'));
var h = ee.Number(feature.get('Height (m)'));

}

var features = ee.FeatureCollection('ft:1tuVLITArmX663I8wGZ3l6h-hAN9_q6wO_5papUwi');

// generate a new property for all features
features = features.map(computeLnAGB);

// show new property values
print(features.aggregate_array('v'));