Sending vector to Piecewise Functions
Ältere Kommentare anzeigen
I have the following piecewise function that I want to use, but I need to send a vector to it. When I try to send the vector, it does not perform the piecewise function based on the condidtions and instead sends back a vector of the calcuation all for the same condition. How can I write this so that I can send the vector for it to come back as I want it based on the conditions?

function value=IC1_wave_func1(x)
if x < .25
value = x/25;
else
value = .015-x/50;
end
end
1 Kommentar
madhan ravi
am 3 Jun. 2020
Show your effort to get response.
Akzeptierte Antwort
Weitere Antworten (1)
madhan ravi
am 3 Jun. 2020
doc piecewise
Kategorien
Mehr zu ARM Cortex-M Processors finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!