for loop saving a vector, not a value
Ältere Kommentare anzeigen
if i had
x = -10:0.1:10;
f1 = trapmf(x,[-2 0 0 2]);
how do i save the (x, f1) values of each iterations using the for loop?
I'm thinking it starts with something like
for
i = 1:length(x)
a = x(i);
b = f1(i);
end
but this will only give me a & b to be 1 value not a vector of length(x)
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Fuzzy Logic in Simulink 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!