Quantcast
Channel: Active questions tagged string-manipulation - Mathematica Stack Exchange
Viewing all articles
Browse latest Browse all 186

How to. automate nutrition calculation

$
0
0

Given a vector of quantities:

fbs = {6.18*10^6, 2.663*10^6, 1.4735*10^7};

I like to create the following code:

kcal = WolframAlpha["6.18`*^6 tons of wheat + 2.663`*^6 tons of potato +       1.4735`*^7 tons of vegetables", {{"CaloriesPlus", 1}, "ComputableData"}];

by replacing the quantities in fbs in kcal. The question is how to insert the numbers in fbs into the numbers in kcal, which are strings.

Thanks


Viewing all articles
Browse latest Browse all 186

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>