Recent content by mkienbau

  1. M

    Comp Sci C++ Image transformation (function help really)

    Thanks for explaining all of that, it really helped clear up a lot! Its working too! Thanks again!
  2. M

    Comp Sci C++ Image transformation (function help really)

    Anyone have any tips? I figured out I'm supposed to use pass by reference rather than by value as I've implemented in here. Still doesn't work though.
  3. M

    Comp Sci C++ Image transformation (function help really)

    Homework Statement I'm making a program in C++ to take an image in .ppm format and either create its inverse or binary threshold. 2. The attempt at a solution #include <iostream> #include <fstream> #include <cmath> #include <cstdlib> //for exit() #include <string> #include...
  4. M

    Comp Sci How to Correctly Implement a 2D Array with Random Values in C++?

    Thanks! So, let's say I have this array filled with random integers ranging from [0,200]. How do I implement a linear search? From what I can find I understand that you'd have to set it up something like this: int m; (m>=0 && m<=R) int n; (n>=0 && n<=C) if (A[i]==m) {...
  5. M

    Comp Sci How to Correctly Implement a 2D Array with Random Values in C++?

    Homework Statement 1. Create a 2D array, A[10][10], of 100 integers. 2. Ask the user for two integers R and C where 0 < R ( 10 and 0 < C ( 10. 3. Using nested loops, fill every element A[i][j] (where 0 ( i < R and 0 ( j < C) with random numbers ranging in [0, 200]. I will describe how to...
  6. M

    Multiplying Power Series: Help & Solutions

    Awesome, I think I got it, I only had to take it out to the x^5 term.
  7. M

    Multiplying Power Series: Help & Solutions

    So I kind of treat it like F.O.I.L.?
  8. M

    Multiplying Power Series: Help & Solutions

    How do I multiply power series? Homework Statement Find the power series: e^x arctan(x) Homework Equations e^x = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} arctan(x) = 0 + x - \frac{x^3}{3} + \frac{x^5}{5} - \frac{x^7}{7} The Attempt at a Solution So do I multiply 1 by 0, x by...
  9. M

    Discrete Math Help: Rewrite Statement with Logical Equivalences

    Heres what I ended up with: \sim ( \sim p \vee ( \sim q \vee r)) \vee (( \sim p \wedge q) \vee r) \wedge ( \sim( \sim p \wedge q)\vee r) \vee ( \sim p \vee ( \sim q \vee r))
  10. M

    Discrete Math Help: Rewrite Statement with Logical Equivalences

    Homework Statement Use the logical equivalences p \rightarrow q \equiv \sim p \vee q and p \leftrightarrow q \equiv (p \rightarrow q) \wedge (q \rightarrow p) to rewrite the statement form: (p \rightarrow (q \rightarrow r)) \leftrightarrow ((p \wedge q) \rightarrow r) Homework Equations...
  11. M

    Another energy conservation problem

    I believe I'm right in my method here, although I didn't do to well in kinematics: PE=mgh KE= 1/2mv^2 At the start you only have PE since velocity=0. When you fly off you have both PE and KE So due the conservation of energy we have: PE(i)+KE(i)=PE(f)+KE(f) Furthermore...
  12. M

    Finding diameter of a wire based on the current and current density.

    You need to design a 0.9 A fuse that "blows" if the current exceeds 0.9 A. The fuse material in your stockroom melts at a current density of 540 A/cm2. What diameter wire of this material will do the job? 540x10^-2=5.40 A/m^2 5.40= .9/x Solving for x gives the answer: .166666666666667...
Back
Top