Homework Statement
I found this algorithm online for computing ln(x). I use the babylonians method for computing square root if it is relevant.
fun naturalLog(desired: Double): Double {
var naturalLog = desired // desired = x
for(number in 0..9) {
naturalLog =...
This has been really informative, thank you! I think once I've implemented a properly working algorithm for this, I can move on to implementations of trigonometric functions. Do you have any suggestions on other methods to look at for approximations?
For now, I'm not too concerned about...
I uploaded the file here if you're interested:
http://www.filedropper.com/spie19991
Not sure why your browser is flagging that site... Loaded for me fine. Proceed at own risk though, lol.
Also, back to your original suggestion. I have a question about computing ##e^x## where ##0<x<1##. How do...
This was very informative, thank you. I was well aware of how a pocket hand-held calculator performed operations but did not bother to actually consider implementing their logic(since I'm implementing this calculator as an android app)
I will read into both the paper you linked and...
Never would have thought that programming would get me more excited to do math! Too cool. I am not too worried about optimization of algorithms for now rather than just getting a proper calculator working.
Edit: Ok abck to my original problem.
So using the summation I mentioned above I get...
Homework Statement
Let's say I want to compute ##2^{2.4134}##. We know that the base is a rational number and the power is an irrational number. Please keep in mind that I have not taken too many math classes yet and I am self-studying right now by making a calculator and respective algorithms...
Homework Statement
Say I have a matrix:
[3 -2 1]
[1 -4 1]
[1 1 0]
Is this matrix onto? One to one?
Homework Equations
The Attempt at a Solution
I know it's not one to one. In ker(T) there are non trivial solutions to the system. But since I've confirmed there is something in the ker(T)...
Oh... right. I didn't know how to add the degree symbol with latex. I feel stupid now.
How about the degree for ##z=-8i##? Am I right to think that it is 270o?
Homework Statement
you are given the standard form z = 3 - 3i
Homework Equations
The Attempt at a Solution
so to convert this to polar form, i know that ##r = 3√2## but how do i find theta here? There are so many mixed answers it seems online that I can't tell... i know that ##(3,-3)## is in...
The subspace of linear combinations that make your system equal to 0?
edit: Now that I think about it, when A is a 3x5 matrix, you need a 5x1 matrix vector X. Since X is 5x1, that means the nullspace is in r5 since X represents all vectors inside the nullspace?
Homework Statement
If we have a 3x5 matrix:
The row space is in r5, the col space is in r3, and the nullspace is in r3 correct?
Because you would need 5 components to be a member of r5 so the col space cannot be a member of r5 correct?
Here is the question: http://prntscr.com/evo91g...
That actually is the full problem description. Here's the link for more examples:
http://codingbat.com/prob/p155405
I fixed the issue though. Like the quote above had stated, endpoint was greater than beginpoint so I had to fix that. The idea of 'subarray' was more or less just parts of the...
Homework Statement
Given n>=0, create an array length n*n with the following pattern, shown here for n=3 : {0, 0, 1, 0, 2, 1, 3, 2, 1} (spaces added to show the 3 groups).
Homework Equations
The Attempt at a Solution
public int[] squareUp(int n) {
int length = n*n;
int[]...
Take what I say with a grain of salt because I myself am not an engineer, but my father had took far beyond what was needed for civil engineering discipline. After he had finished his civil engineering bachelors, for his masters he also did mining and product engineering ontop of his plate. I...
Homework Statement
http://prntscr.com/eqhh2p
http://prntscr.com/eqhhcg
Homework Equations
The Attempt at a Solution
I don't even know what these are, it is not outlined in my textbook. I'm assuming I am is image? But how do you calculate image even?
As far as I'm concerned I am has to do...
I'm a CS student and I'm about to take discrete mathematics next two semesters. My proofs are very weak and I want to change this. (I'm told discrete math is a lot of proofs.)
Are there any books/courses/resources to help me work my way up? I have a summer to prepare for.
Homework Statement
http://prntscr.com/ej0akz
Homework Equations
The Attempt at a Solution
I know there are three problems in one here, but they are all of the same nature. I don't understand how this is enough information to find out if they are subspaces. It's all really abstract to me. I...
No, because they are multiples of one another
So, in hte first set they are linear independent. But because set two has all vectors adding several multiples of each member it is linear dependent(hope this makes sense)? I didn't see that the second set had four members and not three. This makes...
So if you could make a combination that indicates that they are dependent then it would mean that it depends on values of the vectors? I'm having a hard time putting this all into perspective without examples.
How do you know this? I thought they were just 3, individually independent vectors...
Homework Statement
Homework Equations
The Attempt at a Solution
if there exists a set with 3 vectors, and all of them are linear independent, then by definition no linear combination of the 3 vectors can equal to 0.
I believe that's an accurate definition right? So in this case, the...
it is for a class, and unfortunately my freedom for how I solve the homework is limited.
I have actually done what you stated before where it reads the file line by line, however I have a question.
Say I have a condition:
if [ substring is found in line i, col 10-15 ]
then
variable +=...
Homework Statement
Say I have a textfile that is separated by columns, and I want to search columns 10-15. If there are any matches, then I want to cut out specific parts of all the matches and print it to the user. How do I do this?
Homework Equations
The Attempt at a Solution
What I...
Homework Statement
assuming the point given is P(3,2,3) and the equation of the plane is 2x + y + 2z = 2, find the distance and the point Q which represents that point
Homework Equations
The Attempt at a Solution
Okay so I think that OQ-OP = QP, which connects the two points and is the line...
Hi guys, I'm coming back to this problem and I wanted to know why h can't be 4 in this scenario. Is it because the second row will be 0,0? Why does that make this not a unique solution?
Thanks for the clarity. Bash feels a lot different to wrap my head around than with today's systems.
Just curious as well, say I have a textfile(list of medications and their info for example) that contains some information. If I do this:
medDoses=$(cut -f3 <medFile.txt>)
Would medDoses be...
Homework Statement
so I have this text file that I'm reading line by line
and here is an example of a line:
root pts/1 01-19 13:41 (10.0.0.48)
Homework Equations
The Attempt at a Solution
How can I extract the terminal and timeframe only?
I tried
echo $line | cut -d : -f2, 4...
So in the second matrix, since it is a diagonal with non-zero numbers and no variables being free, it is consistent with a unique solution as every variable can be pointed to a specific value(Hope that makes sense)?
And in the first matrix, there is a free variable. If there is a free...
Homework Statement
Consider the following matrix where * indicates an arbitrary number and a ■ indicates a non zero number.
http://prntscr.com/e4xqkx
[■ * * * * | *]
[0 ■ * * 0 |* ]
[0 0 ■ * * | *]
[0 0 0 0 ■ | *]
(Sorry for poorly formatted matrix. The link above contains a screenshot...
Yeah this makes a lot more sense now. I didn't understand what made rows linear independent, I wish my textbook had gone over this. I was wondering why it had to be h that couldn't be 4, and not k but this clarifies that.
Just a question - does k still have to correspond to what h is(it should right - because it would be inconsistent otherwise)? Its bothering me that I can't algebraically find specific, unique values. What if h was 3?
-y = k - 4 - > would k have to be 3?
I have not seen such a theorem before. But I'm having troubles drawing the connections here - I believe that the two rows must be independent of each other, but they also need to be consistent. How does rank play into this? If it is of rank 2, then they will have two rows/columns that are...
for row reduced echelon form i got:
x = (2h-2-k)/h
y = (2+k)/h
I believe rank indicates the linearly independent columns in a matrix, in this case rank 2? Do I just input values for h and k so that x = 1 and y = 1?
Homework Statement
$$
A = \begin{bmatrix}
1 & 2\\
2 & h\\ = k
\end{bmatrix}
$$
Mod note:
Corrected augmented matrix:
##\begin{bmatrix} 1 & 2 & | & 2 \\ 2 & h & | & k \end{bmatrix}##
Homework Equations
The Attempt at a Solution
Ok, so apparently it's a bad idea...