octave

How to port from Matlab to Headless Octave for Web

好久不见. 提交于 2020-06-18 04:47:11
问题 I have a Matlab application that I wrote and would like to put on a AWS server running Octave to make a service publicly available via the web. I've never used Octave. I've read that the "--no-window-system" will allow me to run headless, and I know that I can use "saveas(fig,FileName,format)" to save my figures. My question is will plot() and histogram() work without a head in Octave, and if so how do I go about this? (I want the figures to go to gifs or jpegs that I'll reference in a web

How to port from Matlab to Headless Octave for Web

江枫思渺然 提交于 2020-06-18 04:46:48
问题 I have a Matlab application that I wrote and would like to put on a AWS server running Octave to make a service publicly available via the web. I've never used Octave. I've read that the "--no-window-system" will allow me to run headless, and I know that I can use "saveas(fig,FileName,format)" to save my figures. My question is will plot() and histogram() work without a head in Octave, and if so how do I go about this? (I want the figures to go to gifs or jpegs that I'll reference in a web

Integrate Octave code to a mean-stack website

為{幸葍}努か 提交于 2020-06-16 17:36:08
问题 (* superuser does not like this question, so i post it here *) I have a set of scripts in Octave to undertake a machine-learning algorithm. I have also a website by mean-stack. My question is whether it is possible to integrate this Octave code into the site web, either front-end or back-end. Do I have to rewrite everything in JavaScript or nodeJS? 回答1: You have several options. From a backend point of view: use standard cgi solutions. Octave has a cgi package you can use. This would be my

Integrate Octave code to a mean-stack website

╄→гoц情女王★ 提交于 2020-06-16 17:35:05
问题 (* superuser does not like this question, so i post it here *) I have a set of scripts in Octave to undertake a machine-learning algorithm. I have also a website by mean-stack. My question is whether it is possible to integrate this Octave code into the site web, either front-end or back-end. Do I have to rewrite everything in JavaScript or nodeJS? 回答1: You have several options. From a backend point of view: use standard cgi solutions. Octave has a cgi package you can use. This would be my

Finding smallest eigenvectors of large sparse matrix, over 100x slower in SciPy than in Octave

左心房为你撑大大i 提交于 2020-06-13 19:11:21
问题 I am trying to compute few (5-500) eigenvectors corresponding to the smallest eigenvalues of large symmetric square sparse-matrices (up to 30000x30000) with less than 0.1% of the values being non-zero. I am currently using scipy.sparse.linalg.eigsh in shift-invert mode (sigma=0.0), which I figured out through various posts on the topic is the prefered solution. However, it takes up to 1h to solve the problem in most cases. On the other hand the function is very fast, if I ask for the largest

warning: Matlab-style short-circuit operation performed for operator &

人走茶凉 提交于 2020-05-23 12:44:29
问题 Code: if (round(xw(1))>2) & (round(xw(2))>2) & (round(xw(1))<h-1) & (round(xw(2))<w-1) W0 = img(round(xw(1))-2:round(xw(1))+2,round(xw(2))-2:round(xw(2))+2); else NA=1; break endif xw is a column vector which contains the co-ordinates of a point. h and w are the dimensions of an image. I am using these lines of codes in OCTAVE But when I run the function which contains these lines I get a warning warning: Matlab-style short-circuit operation performed for operator & Is it that in spite of

一步一步教你实现iOS音频频谱动画(二)

烈酒焚心 提交于 2020-05-09 09:04:37
如果你想先看看最终效果再决定看不看文章 -> bilibili 示例代码下载 第一篇: 一步一步教你实现iOS音频频谱动画(一) 本文是系列文章中的第二篇,上篇讲述了音频播放和频谱数据计算,本篇讲述数据处理和动画的绘制。 前言 在上篇文章中我们已经拿到了频谱数据,也知道了数组每个元素表示的是振幅,那这些数组元素之间有什么关系呢?根据 FFT 的原理, N个音频信号样本参与计算将产生N/2个数据(2048/2=1024),其频率分辨率△f=Fs/N = 44100/2048≈21.5hz,而相邻数据的频率间隔是一样的,因此这1024个数据分别代表频率在0hz、21.5hz、43.0hz....22050hz下的振幅。 那是不是可以直接将这1024个数据绘制成动画?当然可以,如果你刚好要显示1024个动画物件!但是如果你想可以灵活地调整这个数量,那么需要进行频带划分。 严格来说,结果有1025个,因为在上篇文章的 FFT 计算中通过 fftInOut.imagp[0] = 0 ,直接把第1025个值舍弃掉了。这第1025个值代表的是奈奎斯特频率值的实部。至于为什么保存在第一个 FFT 结果的虚部中,请翻看 第一篇 。 频带划分 频带划分更重要的原因其实是这样的:根据心理声学,人耳能容易的分辨出100hz和200hz的音调不同,但是很难分辨出8100hz和8200hz的音调不同

MATLAB datenum日期转换为Python日期

我的梦境 提交于 2020-05-09 07:56:12
摘要 MATLAB datenum时间格式参数众多,本文只简单关注 units 参数,即基准年份和计时度量(天、小时)。 命令行演示在 ipython 和 Octave 中进行。 示例1:小时制,基准年份1800-1-1 Time Attributes: units = 'hours since 1800-1-1 00:00:0.0' long_name = 'Time' axis = 'T' standard_name = 'time' coordinate_defines = 'start' delta_t = '0000-00-01 00:00:00' actual_range = [1.74e+06 1.75e+06] avg_period = '0000-00-01 00:00:00' time(1:5): 1744392 1744416 1744440 1744464 1744488 #来源: 参考1 # python import numpy as np origin = np.datetime64('1800-01-01', 'D') date1 = 1744392/24 * np.timedelta64(1, 'D') + origin # '1999-01-01' 示例2:一天制,基准年份1800-1-1 time { String units "days

Unity素材、动画设计类常用插件

让人想犯罪 __ 提交于 2020-05-07 10:57:46
1: Amplify Shader Editor Amplify Shader Editor是一款基于节点的可视化shader编辑器插件,用于制作特效的再合适不过。它提供了一个简单的开发环境,无缝地融合了Unity的UI和Shader的使用。 2: Colorful FX Colorful FX包含了大量的可定制的FX效果和全屏的camera渲染效果。对色彩纠正和图像后期处理有很大作用。 3: Mega-Fiers Mega-Fiers是一个可以让Mesh发生的形变的插件。 4: Surforge Surforge能够帮你在Unity内部快速制作3D模型的texture。 5: NGUI: Next-Gen UI 相信这款插件不用做太多介绍,Unity中制作UI的最强插件。 6: Octave3D-Level Design Octave3D-Level Design帮助Unity开发者制作关卡。 7: UBER – Standard Shader Ultra UBER – Standard Shader Ultra可以帮助开发者制作3A级别的shader。 8: UMotion Pro – Animation Editor UMotion Pro是Unity中一款非常优秀的动画制作插件。 9: Mesh Baker Mesh Baker可以用来合并Mesh和Materials

Error while compiling Octave with GCC

Deadly 提交于 2020-04-30 07:24:47
问题 While trying to compile Octave 4.0.3 using gcc 4.2.8 I get the following error make[2]: Entering directory `/local/home/qa/joseph/app_porting/octave-porting/try_gcc_5.4.0/build_octave/src' GEN mkoctfile.cc CXX mkoctfile.o CXXLD mkoctfile CC octave-display-available.o GEN main.cc CXX octave-main.o CXXLD octave CXX main-cli.o CXXLD octave-cli ../libinterp/.libs/liboctinterp.so: error: undefined reference to 'gzungetc' ../libinterp/.libs/liboctinterp.so: error: undefined reference to 'gzwrite' .