由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Linux版 - meshgrid on linux shell?
相关主题
Finally we have choices of browser on Linuxlinux下的pp-tv recorder?
急问一个Linux shell问题有人用ipython当shell用吗?
问一下在linux下如何写这个命令sed简单问题
Linux有待完善的小缺陷的累记kernel question, DA4 NIU2 please take a look ... thanks
如何对linux文件夹进行比对? (转载)linux backup choice
Linux shell script bookfirefox sync 一问
菜鸟请教什么类型的项目需要linux下面的编程Linux做个好的用户界面, Windows的用户肯定会大幅减少
请教下笔记本选择和购买Shell 求助
相关话题的讨论汇总
话题: record话题: meshgrid话题: linux话题: shell话题: get
进入Linux版参与讨论
1 (共1页)
r*******y
发帖数: 1081
1
on matlab I can use meshgrid as below
[x, y] = meshgrid(1:3, 1:2) and I get
x =
1 2 3
1 2 3
y =
1 1 1
2 2 2
then I can use simple code below to
get all the pairs of choices of x and y:
record =[]
for j = 1 :3
record = [record; x(1, j) y(1, j); x(2, j) y(2, j)];
end
and get the record:
record =
1 1
1 2
2 1
2 2
3 1
3 2
How can I get this record on linux shell? I know seq on linux can generate
a sequence. But now there are two numbers in each line in the record. I
think
there may be some choice on linux shell to do this job.
Thanks for your reading and suggestion.
l*******G
发帖数: 1191
2
The following command (all in one line)
for i in $(seq 1 3) ; do for j in $(seq 1 2) ; do echo $i $j; done; done
1 (共1页)
进入Linux版参与讨论
相关主题
Shell 求助如何对linux文件夹进行比对? (转载)
试一试很牛的国内人开发微型LINUX发行版, CDLINUXLinux shell script book
Linux用什么软件上BBS?菜鸟请教什么类型的项目需要linux下面的编程
初学Linux,弱弱的问个问题请教下笔记本选择和购买
Finally we have choices of browser on Linuxlinux下的pp-tv recorder?
急问一个Linux shell问题有人用ipython当shell用吗?
问一下在linux下如何写这个命令sed简单问题
Linux有待完善的小缺陷的累记kernel question, DA4 NIU2 please take a look ... thanks
相关话题的讨论汇总
话题: record话题: meshgrid话题: linux话题: shell话题: get