Qurak

Do calculations with units

範例 共 4 個步驟,在同一個工作階段中依序執行。每一步都在引擎上實際執行過,下方的輸出就是它產生的結果。

步驟 1
Quantity[19.25, "Kilometers"] + Quantity[13, "Miles"]
輸出
Quantity[40.171472, Kilometers]
步驟 2
Quantity[20, "Feet"] / Quantity[2.3, "Seconds"] + Quantity[9, "Meters" / "Seconds"]
輸出
Quantity[38.22321122903116, Feet/Seconds]
步驟 3
N[Quantity[175, "Pounds"] / Quantity[100, "Kilograms"]]
輸出
0.7937866475
步驟 4
Quantity[24, "Miles" / "Gallons"] * Quantity[16.2, "Gallons" / IndependentUnit["tank"]] * Quantity[1 / 8, IndependentUnit["tank"]]
輸出
Quantity[48.599999999999994, Miles/Gallons*Gallons/IndependentUnit["tank"]*IndependentUnit["tank"]]

使用到的函式

相關的操作範例

所有操作範例 · 函式參考 · 從 MCP 用戶端使用這個