Sunday, August 2, 2015

Identity using matlab

function [Q] = identity(n)
Q = zeros(n,n);
for c = 1 : n
    for r = 1 : n
        if c == r
            Q(r,c) = 1;
        end
    end
end
end

No comments:

Post a Comment

DC motor control with Pulse Width Modulation Part 1

DC Motor intro DC motor is a device which converts electrical energy into kinetic energy. It converts the DC power into movement. The typica...