Naive Gaussian Elimination in Matlab command window for 4 x 4 matrix. Also use command history to create a Matlab script file.
Пікірлер: 36
10 жыл бұрын
Your sound is like Forrest Gump
@yermekatchibayev40623 жыл бұрын
*yroue
@EpateEX8 жыл бұрын
I was having an issue with trying to code this in the most general, iterative fashion, but watching this really helped, thanks.
@whoskentay30165 жыл бұрын
This dude camera suck but his explanation go hard. Thanks alot Mr. Keith. That was beautiful.
@geoffguest137410 жыл бұрын
try this: function x = Gauss2(A, b) % Solve linear system Ax = b % using Gaussian elimination without pivoting % A is an n by n matrix % b is an n by k matrix (k copies of n-vectors) % x is an n by k matrix (k copies of solution vectors) [n, n] = size(A); % Find size of matrix A [n, k] = size(b); % Find size of matrix b x = zeros(n,k); % Initialize x for i = 1:n-1 m = -A(i+1:n,i)/A(i,i); % multipliers A(i+1:n,:) = A(i+1:n,:) + m*A(i,:); b(i+1:n,:) = b(i+1:n,:) + m*b(i,:); end; % Use back substitution to find unknowns x(n,:) = b(n,:)/A(n,n); for i = n-1:-1:1 x(i,:) = (b(i,:) - A(i,i+1:n)*x(i+1:n,:))/A(i,i); end
@brian777717 жыл бұрын
YOU ARE A LIFE SAVER
@kastossss7 жыл бұрын
Did you record this video with calculater body?
@ManuelSeromenho9 жыл бұрын
Hi thanks for the video, do you now a general code for back substitution? For example if I have a matrix bigger or smaller, but if I want to generalize? Like a For loop ?
@priyasharay50899 жыл бұрын
Can you do the same video with a general syntax for n *n matrix using loops in m-file ?Thank you
@ronhernandez88579 жыл бұрын
+Priyasha Ray would be cool huh?
@73moustamra878 жыл бұрын
tried doing your example but my determinant gave me a zero,
@sakshishrivastava66268 жыл бұрын
such a good explainantion THANKS :)
@mthemaniac8 жыл бұрын
For some reason I get det (c) = 0 Also get 0 in an online matrix calculator. Something is wrong!
@dayanaroslan52926 жыл бұрын
THank you very much!
@yuminkochin90954 жыл бұрын
You sound like god.
@omarmorgado55826 жыл бұрын
My name is Forrest Gamp, but you can call me Forrest Gamp.
@TEAGE140311 жыл бұрын
greets from germany
@hemachandpriyan121411 жыл бұрын
shall u pls comment the code or upload it
@yuminkochin90954 жыл бұрын
Than you so much!!!!
@stevewillams584710 жыл бұрын
use a better software next time to capture the video
@olitomar9 жыл бұрын
yeah, the pixelated screen on HD video looks pretty bad :( thanks for the video!
@giridharsamineni97406 жыл бұрын
Point ki ra???
@mixasoda3 жыл бұрын
Your sound like Montasir
@ican7926 жыл бұрын
Please, people want to get answer straightly by coding, not by manual in coding
@Ch176388 жыл бұрын
Good example poor video quality
@trikal89494 жыл бұрын
Ash9le
@paulbaade35642 жыл бұрын
m8 wtf is this video quality?
@matthewmolinar5 жыл бұрын
EXCELLENT. Thanks edit - If you're complaining about the code/ redundancy, this is the theoretical way to do things, and it's up to you to manipulate it as you see fit, skipping steps, making use of built-in functions, and to also type it up on a script lmao