Is there a way to split a Mathematica worksheet, so that I can define parameters that are valid only for a section of the worksheet, like "local parameters" of a Matlab or C++ function?
I need a solution that does not require clearing the parameter each time and assigning them values again please.
I don't want to worry which part of the code I write above or below another.
For a minimal example:
In this section I assign value for C and Q, which should be valid in this section only:
C=1;
f[x_]:=Sin[x*C]
Q=NIntegrate[f[x],{x,0,1}]
In this section I want the parameters to remain free, but not to have to clear them, or define a whole different set of parameter names. The problem with the this trivial solution is that I have too many parameters so it is simply very annoying to do so. -->:
f[x_]:=Sin[x*C]
Q=Integrate[f[x],{x,0,1}]
Thanks!
Update1: Maybe my question is more clear as follows:
Is there a way to split the Mathematica worksheet, such that different section of it will work on different kernels?
Update2: I am looking for something that works like
Block[{C = 1}, Q = Exp[C]],
but for more then one calculation, namely for a whole section of the worksheet.