Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rdpeng/ProgrammingAssignment2
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: wangxhere/ProgrammingAssignment2
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Jan 17, 2015

  1. Assignment: Caching the Inverse of a Matrix

    Matrix inversion is usually a costly computation and there may be some benefit to caching the inverse of a matrix rather than computing it repeatedly (there are also alternatives to matrix inversion that we will not discuss here). Your assignment is to write a pair of functions that cache the inverse of a matrix.
    
    Write the following functions:
    
    makeCacheMatrix: This function creates a special "matrix" object that can cache its inverse.
    cacheSolve: This function computes the inverse of the special "matrix" returned by makeCacheMatrix above. If the inverse has already been calculated (and the matrix has not changed), then cacheSolve should retrieve the inverse from the cache.
    Computing the inverse of a square matrix can be done with the solve function in R. For example, if X is a square invertible matrix, then solve(X) returns its inverse.
    wangxhere committed Jan 17, 2015
    Configuration menu
    Copy the full SHA
    8acd204 View commit details
    Browse the repository at this point in the history
  2. Comments added.

    wangxhere committed Jan 17, 2015
    Configuration menu
    Copy the full SHA
    541ead2 View commit details
    Browse the repository at this point in the history
Loading