Ask Your Question

werner1717's profile - activity

2021-12-14 08:47:31 +0200 received badge  Famous Question (source)
2021-12-14 08:47:31 +0200 received badge  Notable Question (source)
2021-12-14 08:47:31 +0200 received badge  Popular Question (source)
2020-10-16 16:38:35 +0200 received badge  Scholar (source)
2020-10-16 16:24:56 +0200 asked a question 'builtin_function_or_method' object has no attribute 'split'

Code:

import matplotlib.pyplot as plt
%matplotlib inline
import numpy as np
file = 'IV meas -1.50E+0 V to 1.50E+0 V PHY 364 Practical_Dark_temp_25.57oC_Intensity_0.000suns -light OFF- 0 sec wait at 0 Volt.txt'
f=open(file,'r')
delimiter = ','

line=f.readline()
while (line != ''):
    data=line.split(delimiter)
    V1L.append(float(data[0]))
    I1L.append(float(data[1]))
    line=f.readline

each line in the txt file is of the form

-1.50000E+0,-3.22013E-3
2019-07-29 16:22:56 +0200 received badge  Student (source)
2019-07-29 07:44:22 +0200 commented answer type error solving system of differential equations numerically

oh I see thx for the help

2019-07-28 18:36:06 +0200 asked a question type error solving system of differential equations numerically

I tried to solve a differential system numerically as follows:

R = 5
g = 9.8
t = var('t')
x = function('x')(t)
y = function('y')(t)
de1 = diff(x,t) - y == 0
de2 = diff(y,t) + (g/R)*sin(x) == 0
desolve_system_rk4([de1,de2],[x,y],ics = [0,(20/180)*pi,0],ivar=t)

and got a type error:

Traceback (most recent call last)
...
TypeError: Error executing code in Maxima
CODE:
    sage4 : rk(['diff('x(_SAGE_VAR_t),_SAGE_VAR_t,1)-'y(_SAGE_VAR_t)=0,'diff('y(_SAGE_VAR_t),_SAGE_VAR_t,1)+1.96*sin('x(_SAGE_VAR_t))=0],['x(_SAGE_VAR_t),'y(_SAGE_VAR_t)],[%pi/9,0],[_SAGE_VAR_t,0,10,0.1])        $
Maxima ERROR:

rk: variable name expected; found: 'x(_SAGE_VAR_t)
 -- an error. To debug this try: debugmode(true);