如何绘制此 T 平方火增长图

How to plot the graph of this T-sqare Fire Growth

我正在编写一个函数来读取火灾标签 class 和发展时间。但是,我只能绘制成长阶段。如何绘制另一半即衰减阶段以完成如下图 link?

https://imgur.com/a/HbePbp0

代码如下:

function Q3(c,t)
    if c=="S" then
        c=0.0029 
    elseif c=="M" then
        c=0.0117 
    elseif c=="F" then
    c=0.0469 
    elseif c=="U" then
    c=0.1876   
    end
t=0:10:t;
Q=(c)*(t^2);
plot(t,Q,'--r*')
xtitle("The Peak Heat Release Rate = "+string(c*T^2)+"kW")
endfunction

另一半是衰减率,与增长率同比例

我建议用这种方式绘制曲线:

function Q3(c,T)
    if c=="S" then
        c=0.0029 
    elseif c=="M" then
        c=0.0117 
    elseif c=="F" then
    c=0.0469 
    elseif c=="U" then
    c=0.1876   
    end
    t=linspace(0,2*T,1000);
    Q=c*(abs(t-T)-T).^2;
    plot(t,Q,'-')
    xtitle("The Peak Heat Release Rate = "+string(c*T^2)+"kW")
endfunction