Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Rule1 = {z -> Interpolation[Table[{i, i^2 + i}, {i, 0, 2, 0.1}]]};
- Rule2 = {x -> Interpolation[Table[{i, Sin[i] + i}, {i, 0, 2, 0.1}]]};
- func = Sin[x z]/(x + z)^2 /. Flatten[{Rule1, Rule2}]
- Rule1z = Interpolation[Table[{i, i^2 + i}, {i, 0, 2, 0.1}]];
- Rule2x = Interpolation[Table[{i, Sin[i] + i}, {i, 0, 2, 0.1}]];
- fun[i_] = Sin[Rule2x[i] Rule1z[i]]/(Rule2x[i] + Rule1z[i])^2;
- fun[1.2]
- (* -0.0267361 *)
- Rule1 = {z -> Interpolation[Table[{i, i^2 + i}, {i, 0, 2, 0.1}]]};
- Rule2 = {x -> Interpolation[Table[{i, Sin[i] + i}, {i, 0, 2, 0.1}]]};
- RuleAz = z /. Rule1;
- RuleBx = x /. Rule2;
- fun2[i_] = Sin[RuleBx[i] RuleAz[i]]/(RuleBx[i] + RuleAz[i])^2;
- fun2[1.2]
- (* -0.0267361 *)
- fun3[i_] = Sin[x[i] z[i]]/(x[i] + z[i])^2 /. Flatten[{Rule1, Rule2}];
- fun3[1.2]
- (* -0.0267361 *)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement