Questions tagged [simplification]
249 questions
0
votes
1 answer
Allow decimal value in numerator using matlab
Using Matlab, I want my output to have a decimal value in the numerator, but Matlab is automatically evaluating this into a fraction with integers in both numerator and denominator.
I am using symbolic math.
This is part of the output that's…

apatrick
- 194
- 2
- 14
0
votes
1 answer
How do I strip Aptana down to only what I need?
I am very impressed with Aptana, but I am a simple Wordpress developer, who uses jQuery, MySQL, PHP, Wordpress and not much else. I am more than pleased with Aptana's support for these, especially after installing bundles and extensions. However, I…

3x5
- 449
- 1
- 4
- 10
0
votes
4 answers
Simplifying Lists
How Can This Code Be Simplified? That is the question.
stat_keys.append(self.request.get("stat_one"))
stat_keys.append(self.request.get("stat_two"))
stat_keys.append(self.request.get("stat_three"))
…

Rohit Rayudu
- 3,765
- 6
- 21
- 21
0
votes
1 answer
Replace multiple for loops using a function
I was hoping that somebody could take a quick look at this example and help me find a better-more efficient way to approach this problem. I want to run a simulation to examine how an animal moves between sites following a set of specific conditions.…

user1626688
- 1,583
- 4
- 18
- 27
0
votes
2 answers
How can I clean this program efficiently and still detect when the file input is not a letter?
Here is my whole program, I am supposed to calculate the average number of letters in words from an input file called hw4pr11input.txt. I have only been programming for a couple of weeks so I would appreciate simple answers that I could possibly…

nszejna
- 95
- 1
- 3
- 9
0
votes
1 answer
Can any one simplify the where condition of this mysql select
Hi. Can any one simplify the where condition of this mysql select statement? It takes a long time to bring the result or it asks for SET SQL_BIG_SELECTS=1.
In the query below:
The postcode contains values like BH12 or SW10,
The *req_area* contains…

JIS
- 1
- 3
0
votes
3 answers
SQL query simplification
select model from (
select price, model from pc where price = (select max(price) from pc)
union
select price, model from laptop where price = (select max(price) from laptop)
union
select price, model from printer where price =…

ivkremer
- 1,234
- 3
- 23
- 42
0
votes
1 answer
Element is in container or in a container within the container. (Python)
Is there a better way to code this?
def __contains__(self, e):
return e in self.segments or True in [e in x for x in self.segments]
This function should return true if e is in self.segments or if e is in any of the segments in…

Axoren
- 623
- 1
- 8
- 22
0
votes
1 answer
Algorithms/How-to for simple algebraic simplification
Possible Duplicate:
automatically calculate string mathematical expressing in C#
Could someone point me towards some resources which describe in detail how to simplify simple algebraic equations such as "5x+(2x*6x)+2" which should result in…

Marcus Lars
- 51
- 1
- 5
-1
votes
1 answer
Sympy - Change parameters to express a function
I try to use Sympy in order to modify an expression. Here is my problem.
I have a first function from theoratical calculation :
g = f(Km, bm, Kx, bx, V)
I am able to measure two parameters A and B (function of the same parameters) associated with G…

ClementB
- 7
- 1
-1
votes
1 answer
Boolean Simplification - Why does (A + NOT(B.C)).(B + NOT(B.C)).(C + NOT(B.C)) = A + NOT B.C
This is the answer to the equation, but I do not understand why. Please help!

Programmer46234
- 1
- 1
-1
votes
1 answer
Remove redundancies with multiple object types
I have a function that selects some properties from an SQLite query. This function returns e.g. a static List. It works perfectly, the only problem is that I need this function to operate on many different objects, like…

safarondiss
- 3
- 2
-1
votes
1 answer
How to use maple to simplify trig expressions involving arccos and cos?
I'm having trouble convincing maple to simplify a complicated trig expression. It appears the bottleneck is that I don't know how to tell maple that it's OK to simplify expressions like:
arccos(cos(x))
into
x
Instead, if I…

Alec Jacobson
- 6,032
- 5
- 51
- 88
-1
votes
1 answer
How I can simplify this javascript code? too many switch()
I have the code below. It looks long and complicated and now I have to add some more conditions. Is there any way I can simplify this code.Does javascript offer any other way to do the same thing as a switch? Sorry for the long code listing but I…

pedro luis
- 1,545
- 2
- 10
- 8
-1
votes
4 answers
Simplify SQL Server Query by Eliminating Views
I am currently working on a very complex view that in turn retrieves data from several other views. I am worried that if someone changes one of my source views, my query will stop working.
Is there a way on how SQL Server can provide me with a query…

user1447435
- 145
- 1
- 10