Questions tagged [scientific-computing]

Use this tag for questions about using computers in science. Many of these questions also fit on scicomp.stackexchange.com.

Scientific computing encompasses numerical methods, physical simulations, data processing and visualization, and the many other ways in which computers are used to do scientific research.

There is an entire Stack Exchange site devoted to questions about scientific applications of computers. These sorts of questions may get more specialized attention at that site.

756 questions
-1
votes
2 answers

Loop for counting in python

I have two variables of data (BxHPF and ByHPF), which are equall in number of data. I would like to make a loop, which takes first value of BxHPF and ByHPF compute them, then take next one from BxHPF and ByHPF and so on. For now I have: So I though…
Hiddenguy
  • 547
  • 13
  • 33
-1
votes
3 answers

Solve linear system of equations with free variables MATLAB

This is a 3*5 matrix and there are 2 free variables. I don't know if this is the best way to solve this in MATLAB. But it doesn't work and output Empty sym: 0-by-1 clear x_1 x_2 x_3 x_4 x_5 syms x_1 x_2 x_3 x_4 x_5 eqn1 =…
monotonic
  • 394
  • 4
  • 20
-1
votes
2 answers

Use a higher number than the maximum float for the special function lambertw

I am using the special function lambertw (k=-1) in Python 3 and I need to use it with numbers higher/lower than the maximum/minimum float number (1.7976931348623157e+308). What can I do? Also I tried with "decimal", but it did not work, i. e.,…
iaraya
  • 17
  • 4
-1
votes
1 answer

How to make 3d bar plot in Python

I have a data file like the following: Time THR-1 ALA-2 PRO-3 VAL-4 PRO-5 MET-6 PRO-7 ASP-8 LEU-9 LYS-10 ASN-11 VAL-12 LYS-13 SER-14 LYS-15 ILE-16 GLY-17 SER-18 THR-19 GLU-20 ASN-21 LEU-22 LYS-23 HIS-24 …
-1
votes
1 answer

Problems when plotting integrated singular functions in matplotlib

I want to plot the integral of an integral of (singular) function in matplotlib, but my code doesn't work. Mathematically I want this: Code: import numpy as np from scipy import integrate import matplotlib.pyplot as plt def g(x): if…
student
  • 1,636
  • 3
  • 29
  • 53
-1
votes
1 answer

Specifying dtype=object for numpy.gradient

Is there a way to specify the dtype for numpy.gradient? I'm using an array of subarrays and it's throwing the following error: ValueError: setting an array element with a sequence. Here is an example: import numpy as np a = np.empty([3, 3],…
user76284
  • 1,269
  • 14
  • 29
-1
votes
1 answer

How to compute limiting value

I have to compute the value of this expression (e1*cos(θ) - e2*sin(θ)) / ((cos(θ))^2 - (sin(θ))^2) Here e1 and e2 are some complex expression. In the case when θ approach to PI/4, then the denominator will approach to zero. But in that case e1 and…
-1
votes
2 answers

Solve a Matrix for unknows in Python / Numpy / Scipy

I need to solve this system of matrices for the unkowns u4,f1,f2,f3,f5 and f6 for a particular FEA problem. I have generated the matrix containing the numbers with my input and need to solve it for these knowns. The code should act as follows: 0 +…
-2
votes
2 answers

What does 6.50486612e-001 stand for?

I understand that 6.50486612e-01 means 0.650486612. But how about 6.50486612e-001? Are 6.50486612e-01 and 6.50486612e-001 the same value? I did some search but didn't find clear answer so far. I hope to receive some useful comments. Thanks.
-2
votes
1 answer

How many different programming paradigms are there-and what are they?

I am beginner in programming. when I was reading soft computing then many times I encountered the term computing, programming paradigms and soft computing use different programming paradigms like fuzzy logic, artificial neural network, genetic…
-2
votes
1 answer

Issue regarding calculation of sin(x) using Taylor series

I am trying to calculate the value of sin(x) without using the predefined function. Instead I am trying to calculate it using Taylor series. The issue is that the program produces correct values for small values of x(lesser than 10 to be precise). I…
mujtaba1747
  • 33
  • 1
  • 6
-2
votes
1 answer

Is there a way to differentiate a function?

Suppose I have defined a function def func(x): return x**2; Is there a method XXX which takes "func" as an argument and returns another function which is a derivative? For example, dfunc = XXX(func); print(dfunc(3)) gives me 6. I need to…
rims
  • 133
  • 1
  • 8
-2
votes
1 answer

High-level library for GPGPU

I want to use GPU for scientific computation. I know CUDA and OpenCL, but is there more high-level library (if possible, in Python) for GPGPU?
user8483278
-2
votes
1 answer

Python script in abaqus error: 'numpy.ndarray' object has no attribute 'setValues'

Basically, I am trying to output a report with the two data x0 and x1. I followed the Abaqus .rpy format and tried to rename the calculated variable, but it is giving me this error. AttributeError: 'numpy.ndarray' object has no attribute…
Schneider
  • 37
  • 1
  • 8
-2
votes
1 answer

Cumulative cross addition/multiplication in NumPy

a = [1,2,3] b = [2,4,6] c = [1*2, 1*4 + 2*2, 1*6 + 2*4 + 3*2] I have done using dot product by creating Toeplitz matrix but I am looking for a much faster version since I am dealing with a huge dataset. Using loop will also slow down computation.
1 2 3
50
51