i must plot a graph like this:
(there are many functions that are valid for difference particular time in a period, for example for td interval function 1 is valid, for tr interval function 2 is valid...)
a code like this is okey:
but i have to plot these functions, there is a mistake, would you help me please ?
??? Error using ==> mtimes
Inner matrix dimensions must agree.
No products are associated with this question.
On the lines where you calculate b, and e, you probably want to use the element-wise multiplication .* instead of the matrix multiplication * between your two halves. For example:
Also, I think you will want c,d, and f to be arrays, not scalars. For example:
You are missing some (.*) in both b= and e=. However your a,b,c,d,e,f curves doesn't match the pictured curve.
i could not solve again,
the function goes to any j number(s) between any x and y times and i have 6 function in a period
how can i do this ? the picture is an example only it is not valid for this question
So you are not just plotting you are trying to find the point on the curve for any t?
They you are best off forming this into one array and not spread across multiple arrays.
A = zeros(size(t));
A(t>=0 & t<=6.9e-9) = 25e-6*80; tempT =t(t>6.9e-9 & t<=2.29e-8); A(t>6.9e-9 & t<=2.29e-8) = 25*10^-6*tempT./(16*10^-9).*(80+(2.16-80)*tempT./(16*10^-9)); A(t>2.29e-8 & t<2.5e-6)= 4*2.16;