Hi,(adsbygoogle = window.adsbygoogle || []).push({});

I am trying to write a code for summation in matlab. I have two different text files with T and t in them.... I need to write a code that calculates....

http://yfrog.com/5ocalculationj

So, I have T1, T2, T3,T4,,,,,,, and t1 t2 t3 t4.... and i need to use the above equation.... this is the code i wrote...

clc

clear all

load time.txt

load temperature.txt

T = temperature;

t = time;

for i = 1:149

x(i) = [T(i+1)-T(i)]/[sqrt(t(150)-t(i+1))+sqrt(t(150)-t(i))];

end

x

y(1)=x(1);

for j = 2:149

y(j) = y(j-1) + x(j);

end

y

for m = 1:149

q(m)= 41904.076*y(m);

end

q

t_1 = t(1:end-1);

plot (t_1,q)

grid on

the number 41904.076 is the value of the constant...

I dont know what is wrong with the code but i am not getting the result i should be getting... any suggestions ??

Thanks in advance....

**Physics Forums - The Fusion of Science and Community**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# MATLAB Matlab for summation

Can you offer guidance or do you also need help?

Draft saved
Draft deleted

Loading...

Similar Threads for Matlab summation | Date |
---|---|

MATLAB Matlab syntax for 2-d fourier transform | Mar 21, 2016 |

Matlab summation of a complex function | Mar 1, 2015 |

Matlab - Summation | Oct 31, 2012 |

Matlab summations | Sep 8, 2010 |

MATLAB Matlab code for summation? | Apr 26, 2009 |

**Physics Forums - The Fusion of Science and Community**