bicgstab with convergence monitor / modify MATLAB's .m files

1 view (last 30 days)
Hi everybody,
the thing I want to achieve is an iterative matrix solver (bicgstab) that delivers a convergence monitor during run time, i.e., a semi-log plot with the iteration number as x-axis and the achieved relative error of the respective iterated solution as logarithmic y-axis.
The way I was trying to do it was I edited the bicgstab.m file from the Matlab sparse matrix toolbox and just inserted a plot command into the for loop that performs the iterations.
But then, the following error occured:
Undefined function 'iterchk' for input
arguments of type 'double'.
Error in bicgstab_monitor (line 75)
[atype,afun,afcnstr] = iterchk(A);
iterchk is a function that is called from within the bicgstab.m-function, but when I want to call it from the command window, it returns the same error.
It seems that I cannot use the same functions that are called from within the bicgstab.m-function if I just copy and paste it to another place. Can you tell me the reason and maybe a solution to this issue?

Answers (0)

Categories

Find more on Sparse Matrices in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!