Scatter plot of two matrix of same size

26 visualizaciones (últimos 30 días)
Ashish Kumar Choudhary
Ashish Kumar Choudhary el 5 de Jun. de 2020
Respondida: David Hill el 5 de Jun. de 2020
I have two matrix of same size (293 X 293 matrix) and i want to plot the scatter plot of these data as one matrix on X axis and one matrix on Y axix. but the matlab showing the error.
>> y=readmatrix('chr8norm_Nmin_matrix.txt');
>> x=readmatrix('chr8_spatial_distance_0.5_matrix_test.txt');
>> scatter(x,y)
Error using scatter (line 78)
X and Y must be vectors of the same length.
please help me out to solve this problem

Respuestas (1)

David Hill
David Hill el 5 de Jun. de 2020
scatter(x(:),y(:));%after reading x and y in, make sure the matrix size is the same and of type double

Categorías

Más información sobre Scatter Plots 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