- Do you have a question ? Or are you merely telling us what you're going to do?
- If you want us to fix your code, can you attach your code with the paper clip icon?
Want to plot theoretical curve
1 回表示 (過去 30 日間)
古いコメントを表示
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)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/164675/image.png)
3 件のコメント
Star Strider
2014 年 6 月 22 日
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.
回答 (1 件)
Roger Stafford
2014 年 6 月 24 日
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.)
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Yield Curves についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!