No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Hello! I'm trying to transform working Python code to Matlab code. It's Simpson's rule. But MatLab code is not working. What should I change for in this code? Python: from math import sin def f(x): return ((0.6369)*sin(sin(x))*sin(x)) def method_simpson_compost(f,a,b,n): h = (float(b)-a)/n i = 0 fks = 0.0 while i<=n: … |
|
Hello. I need to write a program to evaluate a definite integral with Simpson's composite rule. 1. ![fb9ac9a01f247c8a0ed8a606b7c10f4a](/attachments/small/4/fb9ac9a01f247c8a0ed8a606b7c10f4a.png "align-left") I know there is a Simpson's rule available in Scipy, but I really need to write it by the following scheme. 2. ![239643044a08379e5fe3747e13b2834e](/attachments/small/4/239643044a08379e5fe3747e13b2834e.png "align-left") , where a, b - limits of … |
|
Hello everybody. I'm trying to write program with vectors and iterators. Coordinates X and Y are entered from keyboard (as structure) and placed in vector of points. It's necessary to display coordinates with maximal X and Y. This code was compiled but not display maximal X. What should I change? … |
|
Re:
Hi, i have a program in qml with qtmultimedia 5.0. in the program i use media player and videooutput. when i refrenced media player 's source by a .mov file. it can't play the file. what's the problem? note: my .mov video files have size 5760 * 1080 |
|
Re:
[ATTACH=RIGHT]17428[/ATTACH]Almost every programmer knows his name. He's a living legend in computers. His name is Bjarne Stroustrup, and he created the world's most popular programming language, C++. I had a chance to ask him a few questions. The first three of the questions I came up with, and the remainder … |
|
Re:
Create a C++ program that will allow the user to enter the number(x) to be used as maximum value of loop. //display the square, square root, sin , cos, log and log10 of the number 1 to x.ls) |
|
Good day, I've realized hierarchy of classes: Point -> LineSegment. It's necessary to realize the following methods of the class: moving, stretching, rotating, turning, change on an axis. I'm trying to realize moving at a some distance on this code . What should I correct for in my code that … |
|
Hello everybody! I'm trying to count the number of occurrences of each word in a text file. Problem situation requires to realize menu using "switch" statement (If file exist or not). There are following errors in my program ("case b" and "default" is not working): **[C++ Error] 03_int.cpp(61): E2126 Case … |
|
Hello everybody! I'm trying to display the result of difference of two-dimensional vectors using friend overloading. Builder shows the following error after compilation (line 40). What should I change for in my code in order to find the problem? Thanks in advance. **[C++ Error] 05_Part.cpp(40): E2034 Cannot convert 'double' to … |
|
Hello everybody! I'm trying to display the result of addition of vectors. But Builder shows the error after compilation (line 29). What should I change for in my code in order to find the problem? Thanks in advance. #include <iostream.h> #include <iomanip.h> #include <conio.h> class CVector2D { public: CVector2D(double x0 … |
|
Hi! I'm trying to count the number of occurrences of each word in a text file. But program put in the file the first symbol of inputed word only (line 34) and don't enter in the for-statement (line 51). What should I serach for in my code in order to … |
|
Hello funs2code! I have the following problem. I need to count the number of occurrences of a concrete word in a text file. I've tried to count the number of occurrences of each word at first. The following code has no errors but it isn't working! When I type in … |
|
Hi, I have the following problem: Text file "strlines.dat" contains series of the following information of straight lines: 1) coordinate of one line's point 2) angle slope It looks like (x,y) 45 deg: 2,6 60 4,7 45 2,1 30 After adding this information to associative container verify it and find … |
|
Hello, I have the following problem: Entering coordinates of points on a plain with keyboard (as rows x,y). Analysing this coordinates. Replacing coordinates in vector (point - structure data type). Then calculating distance from the first point to all another points. I've written the code of this problem using arrays … |