piece wise function with variables Invalid indexing or function definition.
古いコメントを表示
I am trying to plot a piecewise function that has input variables and am receiving an error:
%Test%
clear all
clc;
T=0.004;
F=12e+4;
syms t
y = piecewise(0<=t<=(T/4), (8*F*t)/(3*T), (T/4)<=t<=(T/2), (8*F/6)*(1-(2*t/T)), (T/2)<=t<=(3*T/4), -F*(1-(2*t/T)), (3*T/4)<=t<=T, 4*F(1-(t/T)));
fplot(y, [0,T])
2 件のコメント
Walter Roberson
2018 年 3 月 28 日
Rewrite all the A<=t<=B as A<=t&t<=B
Also you need to decide whether t==B exactly should be in this case or in the following case that starts with B<=t
Ryan
2018 年 3 月 28 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Common Operations についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!