MATLAB: Code to read files from ansys fluent and perform calculations

read a .txt file and solve the equation

hello expert,
Am new to matlab. please i need help on how to generate a code that would claculate this equation.
D = C x P ^a x t^b
the vaues of a, b, c are constants with values c =3.62e-7; a =2.416; b = 0.785
the values of P and t are in a .txt file output in columns as attached. t represent time and p represent stress.
please your guidance will help alot
best regards,

Best Answer

Read about textscan.
fid = fopen('Myfile.txt','r') ;
S = textscan(fid,'%f %f\n','HeaderLines',4) ;
S = S{1} ;
fclose(fid) ;
S should be a n*2 matrix. Read baout textscan if the code is not working properly.