Effacer les filtres
Effacer les filtres

How to make a 0.001 difference ?

4 vues (au cours des 30 derniers jours)
Fire
Fire le 31 Mai 2011
Hey All,
I am a novice in matlab. Have a basic doubt
I know how to make a difference say
1:1:100
But how to make a difference to every number add up with another 0.001
Example
[1 1+0.001 2 2+0.001 3 3+0.001 4 4+0.001 5 5+0.001]
As you can see, the 0.001 is not added to every number number the alternative number.
How to do this ? Plz help me

Réponse acceptée

Ivan van der Kroon
Ivan van der Kroon le 31 Mai 2011
a=1:100;
b=sort([a a+0.001]);
  2 commentaires
Oleg Komarov
Oleg Komarov le 31 Mai 2011
b = [a; a+.001];
b = b(:).';
Fire
Fire le 31 Mai 2011
Thank you Guyssssss.. seems to work

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Startup and Shutdown dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by