octave

Oct2Py only returning the first output argument

做~自己de王妃 提交于 2020-08-04 04:13:27
问题 I'm using Oct2Py in order to use some M-files in my Python code. Let's say that I have this simple Matlab function : function [a, b] = toto(c); a = c; b = c + 1; end What happens if I call it in Octave is obviously : >> [x,y] = toto(3) x = 3 y = 4 Now if I call it in Python, using oct2py : from oct2py import octave my_dir = "D:\\My_Dir" octave.addpath(my_dir) a,b = octave.toto(3) This returns : TypeError: 'int' object is not iterable It seems like octave.toto(n) only returns the first value,

哈工大/哈工程被禁用 MATLAB,网友:被卡脖子的领域还不少

隐身守侯 提交于 2020-07-27 09:46:40
(给 程序员的那些事 加星标 ) 5 月 23 日,哈工大/哈工程等 33 个中国机构和个人被美国商务部拉入出口管控的「实体名单」。 近日,此一波被“拉黑”的效应已经在高校中产生了! 哈工大学生 发现无法正常使用 MathWorks 最近有哈工大学生表示 MathWorks 正版软件无法正常使用。与 MathWorks 客服交涉,对方告知“受近期美国政府规定的影响,公司已被要求禁止向哈工大/哈工程提供技术或客户支持”。 也有同学向校内老师咨询,得到如下回应: 自 2020-06-06 开始,因哈工大被列入美国商务部实体名单,影响到了我校 MATLAB 的正常使用,目前我们正在和美国 Mathworks 公司方面积极沟通。非常抱歉给大家带来的麻烦! 有自称 MathWorks 员工的网友在知乎上补充表示,“所谓被禁也只是不能提供技术支持和未来的商务合作,之前卖出去的正版 license 还是可以用的……” MATLAB 是什么? MATLAB 是 MATrix LABoratory(矩阵实验室)的缩写,它是美国 MathWorks 公司的一个商业数学软件,是一种用于算法开发、数据可视化、数据分析以及数值计算的高级技术计算语言和交互式环境。 1970 年代末~80年代初,美国新墨西哥大学教授 Cleve Moler 独立编写了 MATLAB 第一版。 1984 年,克里夫

How to calculate a Bayes estimator using Octave or MATLAB

|▌冷眼眸甩不掉的悲伤 提交于 2020-07-23 06:25:58
问题 I am reading a statistics textbook Introduction to Statistics for Engineers by Sheldon Ross, p.275 and trying to re-do its examples on paper and in Octave. I am not able to replicate many Bayes calculations in Octave when it comes to the integration part. Please advise how to go about replicating below calculation in Octave? Below is a simple Bayes estimator example which naturally becomes a symbolic integration problem, where I often encounter difficulty doing in Octave. [ Clarification :

How to calculate a Bayes estimator using Octave or MATLAB

你离开我真会死。 提交于 2020-07-23 06:25:24
问题 I am reading a statistics textbook Introduction to Statistics for Engineers by Sheldon Ross, p.275 and trying to re-do its examples on paper and in Octave. I am not able to replicate many Bayes calculations in Octave when it comes to the integration part. Please advise how to go about replicating below calculation in Octave? Below is a simple Bayes estimator example which naturally becomes a symbolic integration problem, where I often encounter difficulty doing in Octave. [ Clarification :

How to calculate a Bayes estimator using Octave or MATLAB

拈花ヽ惹草 提交于 2020-07-23 06:23:40
问题 I am reading a statistics textbook Introduction to Statistics for Engineers by Sheldon Ross, p.275 and trying to re-do its examples on paper and in Octave. I am not able to replicate many Bayes calculations in Octave when it comes to the integration part. Please advise how to go about replicating below calculation in Octave? Below is a simple Bayes estimator example which naturally becomes a symbolic integration problem, where I often encounter difficulty doing in Octave. [ Clarification :

How to calculate a Bayes estimator using Octave or MATLAB

拈花ヽ惹草 提交于 2020-07-23 06:23:23
问题 I am reading a statistics textbook Introduction to Statistics for Engineers by Sheldon Ross, p.275 and trying to re-do its examples on paper and in Octave. I am not able to replicate many Bayes calculations in Octave when it comes to the integration part. Please advise how to go about replicating below calculation in Octave? Below is a simple Bayes estimator example which naturally becomes a symbolic integration problem, where I often encounter difficulty doing in Octave. [ Clarification :

How is the octave debugger used?

泪湿孤枕 提交于 2020-07-02 15:47:33
问题 So I'm trying to use the octave debugger to detect where division by zero happens. For that it seems logical to use "debug_on_warning ()". However I'm just not understanding how to use this function call. I mean should I place it in the script somewhere? but then how would the debugger start? an example would be great! 回答1: Take a look at the Debugging section of the Octave manual. For your case, you should place debug_on_warning (1) at the top of your script so it stops when the warning

How is the octave debugger used?

余生颓废 提交于 2020-07-02 15:46:08
问题 So I'm trying to use the octave debugger to detect where division by zero happens. For that it seems logical to use "debug_on_warning ()". However I'm just not understanding how to use this function call. I mean should I place it in the script somewhere? but then how would the debugger start? an example would be great! 回答1: Take a look at the Debugging section of the Octave manual. For your case, you should place debug_on_warning (1) at the top of your script so it stops when the warning

pandas-like object in Octave: add a field to a struct by operating on other fields [closed]

你离开我真会死。 提交于 2020-06-23 12:18:38
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 days ago . Improve this question I want to operate in Octave in a similar manner as done with python pandas. I concluded the most similar object to a dataframe in Octave is a struct. I have a few related questions. How can I create a new field 'nf' in struct mystr , by operating (row-by-row)

How to write a single Octave script with function definitions compatible with Matlab scripts?

喜夏-厌秋 提交于 2020-06-23 03:09:51
问题 If I write this: clc clear close all format long fprintf( 1, 'Starting...\n' ) function results = do_thing() results = 1; end results = do_thing() And run it with Octave , it works correctly: Starting... results = 1 But if I try to run it with Matlab 2017b , it throws this error: Error: File: testfile.m Line: 13 Column: 1 Function definitions in a script must appear at the end of the file. Move all statements after the "do_thing" function definition to before the first local function