Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2008/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Matrix Gnuplot集矩阵维数_Matrix_Gnuplot - Fatal编程技术网

Matrix Gnuplot集矩阵维数

Matrix Gnuplot集矩阵维数,matrix,gnuplot,Matrix,Gnuplot,我有一个数据文件包含两个101*101浮点数矩阵,一个是数据,另一个是错误。 看起来像这样 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10381.8 0 0 3462.03 10341 0 6889.64 6919.26 6916.64 3459.49 10349.8 13781.3 6887.57 24157.2 3459.66 0 24158.9 13792.6 3433.65 27579.4 24117.4 0 0 0 0 0 0 0 0 0 0

我有一个数据文件包含两个101*101浮点数矩阵,一个是数据,另一个是错误。 看起来像这样

0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
10381.8 0 0 3462.03 10341 0 6889.64
6919.26 6916.64 3459.49 10349.8 13781.3 6887.57 24157.2
3459.66 0 24158.9 13792.6 3433.65 27579.4 24117.4
0 0 0 0 0 0 0
0 0 0 0 0 0 0
# Errors [Positon_sample/samp_psd.txt] I_err:
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
4892.66 4890.8 3459.49 5975.49 6890.64 4870.25 9130.63
3459.66 0 9131.25 6896.32 3433.65 9750.84 9115.54
3464.99 4888.97 5972.77 11419.1 7713.44 8438.29 9093.38
0 0 0 0 0 0 0
0 0 0 0 0 0 0
现在我只想绘制第一个矩阵。 我使用“plot'E:\samp\u psd.txt'矩阵和图像” 但是这个程序是腐败的。。。 看来我应该设置矩阵的维数

我的情况有点像这样

我会用两条空行将两个矩阵分开,如下所示:

0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
10381.8 0 0 3462.03 10341 0 6889.64
6919.26 6916.64 3459.49 10349.8 13781.3 6887.57 24157.2
3459.66 0 24158.9 13792.6 3433.65 27579.4 24117.4
0 0 0 0 0 0 0
0 0 0 0 0 0 0


# Errors [Positon_sample/samp_psd.txt] I_err:
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
4892.66 4890.8 3459.49 5975.49 6890.64 4870.25 9130.63
3459.66 0 9131.25 6896.32 3433.65 9750.84 9115.54
3464.99 4888.97 5972.77 11419.1 7713.44 8438.29 9093.38
0 0 0 0 0 0 0
0 0 0 0 0 0 0
plot "samp_psd.txt" index 0 matrix with image
然后,您可以使用
index
命令访问单个矩阵,如下所示:

0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
10381.8 0 0 3462.03 10341 0 6889.64
6919.26 6916.64 3459.49 10349.8 13781.3 6887.57 24157.2
3459.66 0 24158.9 13792.6 3433.65 27579.4 24117.4
0 0 0 0 0 0 0
0 0 0 0 0 0 0


# Errors [Positon_sample/samp_psd.txt] I_err:
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
4892.66 4890.8 3459.49 5975.49 6890.64 4870.25 9130.63
3459.66 0 9131.25 6896.32 3433.65 9750.84 9115.54
3464.99 4888.97 5972.77 11419.1 7713.44 8438.29 9093.38
0 0 0 0 0 0 0
0 0 0 0 0 0 0
plot "samp_psd.txt" index 0 matrix with image

非常感谢你!如果没有空行,它也可以工作。真的很感激!