How to create piece wise from matrix?

How to create piece wise from matrix? Left side for x, right side for y

Answers (1)

Start with this approach:
f = @(x) (x>622).*4 + ((x>=621) & (x<622)).*3 + ...
then continue with the othher elements.

Categories

Find more on Language Fundamentals in Help Center and File Exchange

Products

Release

R2020a

Asked:

on 20 Mar 2021

Answered:

on 20 Mar 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!