Compare each element of a vector with a number and if the element of the vector is higher than the number then replace that element with the number
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Chaudhary P Patel
am 5 Jan. 2023
Beantwortet: DGM
am 5 Jan. 2023
Suppose we have a vector Av=[5;4;6.7;5.5;12;5.4;7]
I want to check that the each element of Av should not more than the 6.
if vector element is more than the 6 then replace that element of the vector Av with 6.
please help me how can i write the command for it?
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu MATLAB Coder finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!