[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Matrix manipulation
From: |
Martin Helm |
Subject: |
Re: Matrix manipulation |
Date: |
Thu, 21 Jun 2012 22:33:53 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120601 Thunderbird/13.0 |
Am 21.06.2012 21:49, schrieb Knof:
> This is my code:
>
> RGB=dlmread("/Users/Knof/Desktop/Matrix.txt");
>
> #Size of matrix
> b=size(RGB);
>
> #Matrix length
> v=b(1,1);
>
> #Divide by 100
> for i=1:v
> value(i,2:4)=(RGB(i,2:4)) /100;
> end
>
What about that instead:
RGB=dlmread("/Users/Knof/Desktop/Matrix.txt");
value = RGB;
value (:, 2:4) = RGB (:, 2:4)/100;