Want to plot theoretical curve

11 views (last 30 days)
sudipta
sudipta on 22 Jun 2014
Answered: Roger Stafford on 24 Jun 2014
I want to plot this two equation . actually these are two theoretical model. I do not have any data for i and t. I know the form of the curve and attaching the plot. I was trying by using some value for t , but getting half bell shaped curve.
equations are i^2/(〖i2〗_max^ )=1.2254(t_mAX/t){〖1-exp[-2.3367( t^2/(t_max^2 ))]}〗^2 i^2/(i_max^2 )=1.9542(t_mAX/t){〖1-exp[-1.2564( t/(t_max ))]}〗^2
Matlab code
x=(1:20);
A=(x./max(x));
C=(A).^2;
for i=1:20
D(i)=[1.2254*(1./A(i))*[1-exp(-2.3367.*C(i))]^2];
end
plot (C,D)
  3 Comments
Star Strider
Star Strider on 22 Jun 2014
Create a vector for t/t_max as:
ttm = linspace(0,5);
then take it or its inverse (use (1./ttm) for the inverse, and (ttm.^2) or ((1./ttm).^2) — note the ‘.’ — for the squared terms) and use that in your equation. If you simply want to plot the curve, it’s not necessary to know what t or t_max actually are.
sudipta
sudipta on 24 Jun 2014
@ Star Strider, I want to plot the curve only. I have attached the code. I have tried giving value for X but tat selection are not proper for the type of plot I want to get. But how can I plot without giving some input range for X? Thanks

Sign in to comment.

Answers (1)

Roger Stafford
Roger Stafford on 24 Jun 2014
The scale factors 1.2254 and 2.3367 in your first theoretical equation have been so chosen that the function
f(z) = 1.2254/z*(1-exp(-2.3367*z^2))^2
attains a maximum value of 1 just at z = 1. Since z here is simply a ratio t/t_max where t_max indicates the value of t where f(t/t_max) attains its maximum value, there is no way you can plot the value of f(t/t_max) against just the variable t without further information. Similarly there is no way you can plot just i without some further information about i_max. If you know both t_max and i_max, you could then find the i against t curve with:
i = i_max*sqrt(f(t/t_max))
A similar statement holds for the second theoretical equation.
In other words you cannot plot the curve of i against t just from the plot you have exhibited above without also knowing both i_max and the corresponding t_max.
(Note: Calling it t_max is somewhat misleading because it refers to a value of t where i is maximum.)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!