Matlab

Re: Octave Symbolic Package

de către asa czylabson-
Număr de răspunsuri: 2
dear Richard!
thank for your kind reply.
i started to use coderunner in this semester, honestly, i have only a vague understanding of the system, but i managed to set a few questions, by modifying a very simple example found here or elsewhere on the net.
i am very enjoying setting the through the coderunner.
it is the first issue that i am unable to solve.

the scenario is the following:
type octave_function, symbolic for octave and sympy for python is installed

when i define the answer involving symbolic computation (not a real problem):
pkg load symbolic;
sympref('quiet',1);
syms f x;
f(x)=x^2;
disp(diff(f,x));

and i save this draft version, (w/ validate on save checked), then i see the correct result
(computed by octave) with the aforementioned 'run error' and a kind of python prompt.
i attached the screenshot and the xml.

(i suspect some communication error between python2(numpy) and octave(symbolic), that is unrelated
to the coderunner, but currently no sympy under python3 on the server, so i cannot test it.)

best wishes, Csaba




Atașament crhiba.png
Ca răspuns la asa czylabson

Re: Octave Symbolic Package

de către David Forehand-
Hi Csaba,
Apologies for coming into this conversation late. With the great help of Richard last year, I managed to get the symbolic Octave package working with CodeRunner. I have ran your xml file and it seems to work OK for me. See the screenshot below. Of course, your code fails the first test because you don’t have an “Expected output” in your first test case. You also don’t have a semicolon after “diff(f,x)”, and so the output “2.x” is seen in the first test. I’m attaching a test xml question that I made. Basically, I don’t want my students to know that I am using Octave. I want them to think that they are using Matlab because that is what I am teaching them. I “customise” the question and put the “pkg load symbolic” in the Template. I have a first test which captures the initial output “Symbolic pkg v2.8.0: Python communication link active, SymPy v1.5.1.” and then I can carry on with normal tests. I’ve filled the “answer” box with symbolic Matlab functions from my course - just to see if they also work with the symbolic Octave package and in CodeRunner. I’m by no means an expert with CodeRunner but I’ve just managed to find a way that works for my needs. Richard has been a great help throughout. I’m sorry, I’m not sure what is the problem with your symbolic Octave installation in CodeRunner? Richard is much better for that than me.
All the Best,
David


Ca răspuns la David Forehand

Re: Octave Symbolic Package

de către asa czylabson-
dear David,
Thanks for the guides!
Perhaps my problem is related to our jobe server's setup (for example "version conflict" between octave,symbolic,python,sympy...), because the xml that You provided gives the same
'run error + python prompt'
error, even after removing the default memory+cpu limits, as proposed by Richard.

Anyway, it is a good news, that it will work with appropriate jobe server settings.

best wishes, Csaba