Question

How to add the algorithm that finds the "convergence rate" of algorithms in MATLAB?

How to add the algorithm that finds the "convergence rate" of algorithms in MATLAB?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

`Hey,

Note: If you have any queries related the answer please do comment. I would be very happy to resolve all your queries.

There is no such clear cut formula to it. But, we can calculate the time taken by both algorithm and find the ratio to calculate the rate.

So, for example

clc%clears screen
clear all%clears history
close all%closes all files
format long
n=1000;
A=rand(n);
b=rand(n,1);
tic;
x=A\b;
t1=toc;
n=2000;
A=rand(n);
b=rand(n,1);
tic;
x=A\b;
t2=toc;
disp('Approx rate is');
t2/t1

Kindly revert for any queries

Thanks.

Add a comment
Know the answer?
Add Answer to:
How to add the algorithm that finds the "convergence rate" of algorithms in MATLAB?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT