Questions tagged [numerical]

This tag is for questions concerning problems using numbers which either cannot be exactly solved, or where the exact solution may be much more difficult to acquire than by using numerical methods.

This tag is for questions concerning problems using numbers which either cannot be exactly solved, or where the exact solution may be much more difficult to acquire than by using numerical methods.

It includes questions about algorithms, precision and accuracy of underlying numbers, advantages and disadvantages of several methods, error propagation, problems with the underlying numbers and data structures.

508 questions
-2
votes
1 answer

numerical double integral function handle

power = 2; sigma=0.1; a = 1 /(sigma*sqrt(2*pi)); c= (sigma^2)*2; syms x y f = exp(-(x.^power)./c); dfdx = diff(f,x); c1 = diff(dfdx,x); f = exp(-(y.^power)./c); dfdy = diff(f,y); c2 = diff(dfdy,y); meancurvature = (c1 + c2)./…
-2
votes
1 answer

Runge-Kutta Method using matlab

eaxmple first-order derivative using matlab.if we did for second-order derivative,How does this code change? % y'=(x+2)/y y(0)=1 % y=sqrt(x^2+4*x+1) clear all x(1)=0; ry(1)=1; dx=0.1; for…
-2
votes
1 answer

Numerical Double Integration in Java

I have to implement a numerical computation of double integrals in Java. Concentrating on the integrate() function, here's what I have to far: public static double Integrate(Integravel integrando, boolean pontoMedio) { double sum = 0.0; …
yves
  • 29
  • 7
-2
votes
2 answers

How to print instance name that do not match numerically between 2 files?

I would like to compare 2 files numerically for each instance name and output any mismatch property. Ref.txt: CELLA CELLA 0.0000 0.0000 0 0 50 47 100 390 798 1000 3349 2938 CELLA/I0/I0 INV 0.0200 0.2210 0 0 20 200 30 100 430 770 230 940 CELLA/I0/I2…
annel
  • 59
  • 7
-2
votes
3 answers

Made numeric decrement

anybody can help me me with this? I have a variable such: $page = '50'; $newpage = 'http://www.mydomain.com/page/'.$page.''; I want new page echo such this: http://www.mydomain.com/page/50 http://www.mydomain.com/page/49 ...... ....... .......…
-3
votes
2 answers

accepting a matrix in python

I keep getting the error 13 for k in range(0,n-1): 14 for i in range(k+1,n): ---> 15 if A[i,k] != 0.0: 16 lAm = A [i,k]/A[k,k] 17 A[i,k+1:n] = A[i,k+1:n] -…
Beginner Java
  • 65
  • 1
  • 8
-3
votes
2 answers

How use creating polynomial expression like function in Python?

I'd like to write a program in Python where user define a deegre of polynomial and coefficients (a,b,c). When program create a polynomial expression with this data I'd like to use it like function because I need this to other operations. How can i…
user8908603
-3
votes
1 answer

In C, how can I check if the content of a string is not a number (where negative numbers are allowed)?

Suppose my string is "g9". I want my check to indicate that the string doesn't contain a number. However if my string is "123" or "-123", it should indicate that it's a number and it should return that string.
Minh Tran
  • 494
  • 7
  • 17
-4
votes
2 answers

Numerical pyramid puzzle algorithm needed

Is there any general algorithm to solve this kind of puzzle? https://i.stack.imgur.com/PNH5Q.jpg Any sub O(N^3) solution will be greatly appreciated <3
-4
votes
2 answers

Numerical issues when adding and subtracting

I am wondering if it is possible that the following C program prints something else then 0? double f(double x, double y) { return x*x/x+x*x*x; // or whatever operations using *, /, +, - } int main(int argc, char** argv) { double x = 4.0; …
syl
  • 41
  • 5
-5
votes
1 answer

For example, the input: 02/26/1986 should produce the the output: Feb 26,1986. Pls Help me what is the code?

JAVA: Create a program that accepts dates in numerical form and then output them as a complete form. For example, In Terminal, i input: 02/26/1986 and i enter should produce the the output: Feb 26,1986. Pls Help me what is the code?
-6
votes
1 answer

Python Sorting through notepad in Alphabetical, numerical and average order

I have created a quiz that contains 10 maths questions. The quiz outputs whether or not the answer is correct. The coding also correctly stores the scores in a simple notepad document. The store is sorted into three different classes. Now I am stuck…
Peter
  • 1
  • 1
-8
votes
2 answers

Numerical erroneous values checking, how can i do it?

I have an exercise that asks me to create 2 classes, each of which will carry some variables and i have to be able to access and modify them through properties. public class FoodItem { public string drinkname; public string…
Thanice
  • 1
  • 1
1 2 3
33
34