Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
Hi Masters
I.Ton(t,T) is a formula function in every duration of T0 and T0+Ton, T1 and T0+Ton.
and Ton is a constant value and T0, T1, T2....in the array series of T
How dose the program compare the duration with time variable "t" to plot I.Ton(t,T) through the time?
tks
Solved! Go to Solution.
If your for loop runs up to last(T) you possible can't access T[i+1.
Change the for loop to run just up to last(T)-1 and see if it helps.
Hi,
It would help immensely if you attach the worksheet.
Cheers
Terry
Hi Terry
I have attached it, thank you for the help.
I second what Terry said about attaching the worksheet.
You don't show how the function I.Ton() is defined and why it would need the full vector T as its second argument.
But maybe you get what you expect if you replace t by t-T[i when you call I.Ton in your function
EDIT: had not noticed that you attach'd it in the meantime. Will have a look later.
EDIT2: Had a look but its not clear to me what you are trying to achieve. But I see that you changed the second argument from T to T[i now when you call I.Ton and that I.Ton seems to consider the position itself. So my suggestion above does not apply.
Could it be that you are looking for something like this (I had to change the step in your range because of calculation time)
Here is the modified worksheet attached and a zoom of the first 20 microseconds
And here a more generic zoom, looks to me like what you described in the initial posting
Hi Werner
I am greatly appreciated for your help that has fixed my first problem.
I encounter the second problem i can not assign the different Matrix index in array T in one time.
e.g. T[i+Ton<t<T[i+1, how to resolve T[i+1 this problem? tks.
If your for loop runs up to last(T) you possible can't access T[i+1.
Change the for loop to run just up to last(T)-1 and see if it helps.
Hi Werner
I have replaced last(T) by 5001, but it's not working.
5001 IS THE SAME as last(T)!
You should use ONE LESS, last(T)-1 (which in your case is 5000)
yes. yes...i see, thank you so much.