create point betweem two points
    2 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
    Majid Al-Sirafi
      
 il 15 Lug 2012
  
    
    
    
    
    Modificato: Walter Roberson
      
      
 il 28 Gen 2018
            Hi every one
I have two points, for example
(2,5)-(10,15)... how can I create a new point between them???
thanks a loot
majid
0 Commenti
Risposta accettata
  Walter Roberson
      
      
 il 15 Lug 2012
        NumberNewPoints = 3;
xvals = linspace(2, 10, NumberNewPoints+2);
yvals = linspace(5, 15, NumberNewPoints+2);
pts = [xvals(:), yvals(:)];
Now the points are the rows.
11 Commenti
  Walter Roberson
      
      
 il 16 Lug 2012
				
      Modificato: Walter Roberson
      
      
 il 28 Gen 2018
  
			pts(1,:)   %x,y for starting point
pts(2,:)   %x,y for intermediate point
pts(3,:)   %x,y for final point
Più risposte (1)
Vedere anche
Categorie
				Scopri di più su Fixed-Point Designer in Help Center e File Exchange
			
	Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



