Borrar filtros
Borrar filtros

Need help on plotting the graph

1 visualización (últimos 30 días)
reez all
reez all el 7 de Mayo de 2012
i need help on plotting the dot on the graph, although this will not affect my result but i really need it on my graph..
clearall;clc
sizeA=[20 20];
x1=1:sizeA(1);
for j=1:sizeA(2)
X(j,:)=x1;
Y(:,j)=x1';
end
plot(X,Y,'r*')
The problem in here is, this code only can be used if the dimension is same, but i required different dimension which is zeros(20,30). Thank you for your help.
  1 comentario
Walter Roberson
Walter Roberson el 7 de Mayo de 2012
You need to describe the behavior you want when the arrays are not symmetric.

Iniciar sesión para comentar.

Respuesta aceptada

Walter Roberson
Walter Roberson el 7 de Mayo de 2012
Guessing what you are trying to do here:
[X, Y] = ndgrid(1:sizeA(1), 1:sizeA(2));
plot(X, Y, 'r*');

Más respuestas (0)

Categorías

Más información sobre Graph and Network Algorithms en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by