2つの一次関数を組み合わせたい
9 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
遼 柄澤
el 7 de Oct. de 2021
Comentada: 遼 柄澤
el 11 de Oct. de 2021
お世話になります。
y=x (0<=x<=2)
y=0.2x+1.6 (2<=x)
となる関数はどのようにプログラムすればいいのでしょうか?
よろしくお願いします。
0 comentarios
Respuesta aceptada
Hernia Baby
el 7 de Oct. de 2021
piecewise を使うとシンプルにできます
syms x
y = piecewise(0<=x<=2,x,2<=x,0.2*x+1.6)
fplot(y)
Más respuestas (0)
Ver también
Categorías
Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!