I haven't used parfor too extensively, so there could likely be better answers than mine. Anyway, what I notice in your code are these:
1. The parfor loop range does not seem correctly declared. I believe you cannot define your own increment like the e in k: e :l. Anyway, if that is not your error, look at the following other possibility:
2. Parameter X_f is not known to any worker, as I see it appearing for the first time inside the parfor loop here:
C_pf = Specific_Heat(T_f,X_f);
My way would be to create a function called RETURNXF that take X1,X2, ...XN as inputs and returns X_f, and call RETURNXF with a handle like this:
w = 1;
A = (M_d*C_pd*T_d)+(M_b*C_pb*T_b);
D = (M_d*C_pd + M_b*C_pb);
T = [];
function X_F = RETURNXF(X1,X2,..XN)
...
...
Statements to yield X_F
...
X_F=...
end
RTXF = @RETURNXF;
Then modify your parfor loop like this:
parfor (T_F=1:LIMIT)
...
Construct here the New_Loop_Index in place of T_f to be used in the Specific_Heat function, based on whatever loop increment you want to give.
...
Following are variables needed as input to RETURNXF function
X1=..;
X2=..;
..
XN=..;
X_f=RTXF(X1,X2,..XN)
C_pf = Specific_Heat(New_Loop_Index,X_f)
..
Rest of your code
Hope that works. Good luck!