How to plot the product of two piecewise function
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Consider any two piecewise functions say f(x) , g(y) and then define a function h(x,y) by multiplications of f(x) and g(y) i.e. h(x,y)=f(x)*g(y).
Now, please plot this function h(x,y).
2 Commenti
Risposta accettata
Walter Roberson
il 22 Lug 2022
Modificato: Walter Roberson
il 22 Lug 2022
syms f(x) g(y)
f(x) = piecewise(x < 0, sin(x), cos(x))
g(y) = piecewise(y^2<1, y, y^2)
h(x,y) = f(x)*g(y)
fsurf(h, [-3 3 -3 3])
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Surface and Mesh Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


