Skip to content
Snippets Groups Projects
Commit f34db9c7 authored by Sokol Serguei's avatar Sokol Serguei
Browse files

added example to readme

parent 6a9cdc2c
No related branches found
No related tags found
No related merge requests found
......@@ -22,4 +22,11 @@ This is a basic example which shows you how to solve a common problem:
``` r
library(gmresls)
# prepare a 4x3 toy problem Ax=b
A=rbind(diag(1:3)+matrix(1, 3,3), rep(1, 3))
xsol=1:3
b=A%*%xsol
f_Ax=function(x,...) list(...)$A%*%x
f_Br=function(r,...) t(list(...)$A)%*%r
x=gmresls(f_Ax, f_Br, b, A=A)
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment