这个博客文章以Matlab中的一个现场脚本开始。我本来可以开始打字成WordPress,但后来我就无法这样做。
退后...
m = linspace(-3 * pi,3 * pi,400);
s = sin(x).*sin(y).*log(abs(x)).*log(abs(y));
yowza!
这是很多爆米花,因为不是很多代码。地球在这里发生了什么?大部分戏剧来自于此
狂野不同的Colormap.。Let's look at this surface from the side.
让我们剥离颜色以获得更好的照片。什么是潜在的形状?
SET(GCA,DATASPECTRATIO = [1 1.5])
light(Position=[10 1 10])
我们可以进一步分解它仍然看到有一种蛋纸盒纹理被乘以四瓣折叠形状。我们在沿着轴上的某些信息方便地光泽。
s2 = log(abs(x))。* log(abs(y));
SET(GCA,DATASPectratio = [1 0.75])
light(Position=[10 1 10])
It's fun dissecting this image in a Live Script. But that's not what I'm here to talk about today. What I want to talk about is this: I'm typing this in the MATLAB Editor and you're reading it in WordPress. How did that happen?
从代码到散文
I'm sure you can imagine various tedious ways to move a Live Script onto a blogging platform. It would involve lots of copying and pasting bits of text and screenshotting individual images. But what if I told you it was super easy and only took a few seconds?
好的,让我不那么假设:我告诉你它很容易,只花了几秒钟。你可以在新的,自由的帮助下做到这一点
WordPress发布工具现在可用
文件交换and
GitHub.。因为我喜欢Matlab脚本和博客,这让我很开心。该工具是由Mathworks Developer Cheng Chen创建的,我一直在使用它的早期版本。一个例子是
我宣布迷你黑客比赛的帖子。Given all the MATLAB calculations in there, it would have been difficult to create any other way. But this way it's a breeze.
使用发布工具启动的最简单方法是转到MATLAB中的Add-Ops Explorer。搜索“WordPress”并添加文件。一旦您安装了所有内容(WordPress侧面上有一个插件以及Matlab侧的应用程序),请运行Matlab应用程序。在您提供有关您博客的一些详细信息后,只需按大“发布”按钮,您就在路上。
我会向生成的文章提供一个链接,但你现在正在读它!
Special Thanks to Sumihiro
顺便说一下,今天的起始形象是由Sumihiro的改编
Symmetry在迷你黑客比赛中,我们去年秋天跑了。该条目是鼓舞人心的,重新定罪,共计32次!更不用说我在这里进一步将它重新混入的事实。谢谢Sumihiro!
如果您使用此工具创建自己的博客文章,请在下面的评论中包含将其链接!
Comments
要发表评论,请点击here要登录您的MathWorks帐户或创建新的。