Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

For-loop in Matlab

1 visualizzazione (ultimi 30 giorni)
Sergey Dukman
Sergey Dukman il 16 Mag 2015
Chiuso: MATLAB Answer Bot il 20 Ago 2021
Hei!
I have the following for-loop:
for c=(1:10)
x=sind(c)
end
disp(x)
How can I get all values of x as a row vector? Matlab gives me values of x separately from each other. I want to combine them all together.
Sergey
  2 Commenti
Radmilka
Radmilka il 16 Mag 2015
for c=(1:10)
x(c)=sind(c);
end
disp(x)
Sergey Dukman
Sergey Dukman il 16 Mag 2015
Hei!
Thank you!
best regards, Sergey Dukman

Risposte (1)

Nobel Mondal
Nobel Mondal il 16 Mag 2015
Modificato: Nobel Mondal il 16 Mag 2015
You don't even need a for loop
c = 1:10;
x = sind(c);

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by