mathematica 8.0.1小疑问之depth of object

Mathematica的一个小问题,谁能帮我看下a={{1,2,3},{4,5,6}},b={{7,8,9},{10,11,12}}我想让他们一一配对成{1,7},{2,8},{3,9},{4,10},{5,11},{6,12}程序该如何编制呢?这个太容易了,换一个c = {{{1,2},{3,4}},{{7,8},{9,10}}};d = {{5,6},{10,11}};组织成{{1,2,5},{3,4,6},{7,8,10},{9,10,11}}如何编制程序
mbkbuuhsiy
MapThread[Append,{c,d},2]
不对,得出的结果不是我要的,我自己弄得太糟糕了 Flatten[Thread /@ Thread[List[c, d]]]~Partition~3
In[4]:= c = {{{1, 2}, {3, 4}}, {{7, 8}, {9, 10}}};
d = {{5, 6}, {10, 11}};
Flatten[MapThread[Append, {c, d}, 2], 1]
Out[6]= {{1, 2, 5}, {3, 4, 6}, {7, 8, 10}, {9, 10, 11}}
Flatten一层就行了啊。。。
为您推荐:
其他类似问题
扫描下载二维码小木虫 --- 500万硕博科研人员喜爱的学术科研平台
&&查看话题
请教一个mathematica的问题
想在mathematica中定义一个函数f,并且f是x1,x2,x3这三个函数的函数。f,x1,x2,x3全都是与r相关的。函数如下,
f=x1+x2+x3
但是问题就是,目前却不知道x1,x2,x3的具体表达式,只知道x1,x2,x3与r相关。
为了能让mathematica识别f这个函数是与r相关,且还要让mathematica知道x1,x2,x3这三个函数也是与r相关(但是目前不知道具体表达式)。
f函数该怎么写?这个问题该怎么解决呢?
x1,x2,x3 对r的导数不知道为不为0.
这个该怎么解决呢?:rol::rol:
D求导,这个我知道。
但貌似对我的解题没有多大帮助;);)
哦哦,我明白你的意思了。
他们是可导函数。
谢谢啦~~~:victory:
大阪主我明白你意思了。
我明白你的意思了,刚脑袋短路了:rol:
研究生必备与500万研究生在线互动!
扫描下载送金币【求助】如何改变未赋值变量的默认长度 | Mathematica小组 | 果壳网 科技有意思
7940人加入此小组
w1 = Table[w11[[n]] eperp[[n, 1]] + w12[[n]] eperp[[n, 2]], {n, 1, 5}];w2 = Table[w21[[n]] eperp[[n, 1]] + w22[[n]] eperp[[n, 2]], {n, 1, 5}];Length[w11[[1]]][out]=2 "Part specification w11[[1]] is longer than depth of object"头两行是我程序里的两行代码,我希望w11是一个以5个标量作为函数的列表,但是运行的时候报错显示为"Part specification w11[[1]] is longer than depth of object",所以我查了一下w11[[1]]的长度,发现是2请问各位大神为什么会出现这种情况?用什么方法可以改变w11里面元素的默认长度呢?谢谢
+ 加入我的果篮
这段代码不给w11赋值怎么跑……要不你把 = 改成 :=?
没给w11赋值的话,Length[w11[[1]]]确实是2,因为它的FullForm是Part[w11, 1]。
(C)2016果壳网&&&&京ICP证100430号&&&&京网文[-239号&&&&新出发京零字东150005号Mobile Apps
Engineering, R&D
Web & Software
Finance, Statistics & Business Analysis
Need Help?
Premium Support
Work with Us
Initiatives
How do I fix common problems by resetting Mathematica to its default configuration?
If you have saved anything to these directories, please back them up before performing a clean start. If you have edited any init.m files, they would be located in these directories.
After performing the clean start, Mathematica may need to be activated again. You can access your activation information through the .
To perform a clean start on Windows, start Mathematica while holding down the Ctrl and Shift keys. Keep the keys held down until the Mathematica screen appears. If this does not address the issue, you can perform a clean start manually by deleting the Base Directory and User Base Directory on the computer.
By default these directories are located at:
C:\ProgramData\Mathematica
C:\Users\&user&\AppData\Roaming\Mathematica
where &user& is your username on the computer.
These files may be hidden on your computer. You may need to .
To perform a clean start on a Mac, start Mathematica while holding down the Option and Shift keys. Keep the keys held down until one the Mathematica screen appears. If this does not address the issue, you can perform a clean start manually by deleting the Base Directory and User Base Directory on the computer. By default these are located at:
/Library/Mathematica
~/Library/Mathematica
These files may be hidden on your computer. To navigate to a hidden folder, open the Finder application. Press Command + Shift + G to open a file search dialog and enter “~/Library/Mathematica/”. Finder opens the hidden folder.
To perform a clean start on Linux, start Mathematica by running the following in your terminal:
mathematica -cleanstart
If this does not address the issue, you can perform a clean start manually by deleting the Base Directory and User Base Directory on the computer. By default these are located at:
/usr/share/Mathematica
~/.Mathematica
If this does not solve the problem, please contact
for assistance.
Is this article helpful?
Quick Answer Topics
For Customers
Public Resources
Enable JavaScript to interact with content and submit forms on Wolfram websites.<td class="t_msgfont" id="postmessage_. +&&2. (2.3*10^-10 + 2.12*10^-10
即使是如上式规整的表达式也不会合并,啥原因呢?Simplify指令都用了呀。请大家指点一下,谢谢!
UID24613&帖子280&精华0&积分1778&资产1778 信元&发贴收入1935 信元&推广收入0 信元&附件收入2800 信元&下载支出3047 信元&阅读权限30&在线时间915 小时&注册时间&最后登录&
本帖最后由 saiaoying 于
16:15 编辑
2. +&&2. (2.3*10^-10 + 2.12*10^-10)象这样的式子都不简化,太不可思议了,Simplify命令都用了呀。
[通过 QQ、MSN 分享给朋友]
TI信号链专区正式上线,欢迎访问!

我要回帖

更多关于 mathematica 对数 的文章

 

随机推荐