I am calculating total cost of shipment for different countries. As input I have an initial fee and origin country and destination country. As output I would like to get the total cost. Of course depending on the origin and destination country the formula to calculate the total cost varies.
To solve this solution I thought I should use a matrix which contains the formulas needed to apply to calculate the total cost. My problem is I really dont know how to make matrix which contains formulas. Could you point me in the right direction, please?
Just to make it more understandable I made a sketch of the matrix I was thinking of below.
Input function:
totalCostCalc(init_cost, origin_country, destination_country)
The different colors of matrix elements show the different formulas or functions applied.
Could you please help me by showing how to start, or something similar as I am really stuck.