what does 1 indicate in f=100:1:400?

my program is f=100:1:400 X=2*3.14*f Z=r+j*X plot(f,Z)

3 Commenti

Aside from the answer(s) given to you below, note that the "1" is unnecessary. Whoever wrote your code could have just done
f=100:400;
since an increment of 1 is the default.
it simply means that the middle value is just increment only, right?
yes.

Accedi per commentare.

 Risposta accettata

the cyclist
the cyclist il 7 Ott 2012
Modificato: the cyclist il 7 Ott 2012
The statement
>> f = 100:1:400
tells MATLAB to create a vector of values from 100 to 400, with a spacing of 1. Similarly,
>> f = 100:100:400
would result in
>> f = [100 200 300 400]
You can read a bit more by typing
>> help :

Più risposte (0)

Categorie

Scopri di più su Graphics Performance in Centro assistenza e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by