octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Proposal for GSOC 2017


From: Juan Pablo Carbajal
Subject: Re: Proposal for GSOC 2017
Date: Thu, 23 Mar 2017 12:27:55 +0100

On Wed, Mar 22, 2017 at 7:02 PM, Harshit Patel
<address@hidden> wrote:
> Hello,
>
> This is Harshit Patel from Gujarat Technological University, Ahmedabad,
> India and I have a project proposal to made. Below is a small glimpse of the
> same, please provide your valuable feedback for the same,
>
> Recently I was learning Huffman coding and implementing that on the Matlab
> at my university. While implementing the same I found that I was unable to
> generalise the code for any no. of set of symbols as I was using Matrix
> multiplication technique which is efficient compared to a for loop. I was
> unable to do the same because the equations for the Huffman coding technique
> included logarithms in it. I checked the same on Octave and the problem was
> same over there as well.
>
> In solution to that I think that we can make a function which can make
> series or matrix of functions(i.e. log,sin or cos). example 1:10 will give a
> matrix [1 2 ........ 10] like that log(1):log(10) will give [log(1) log(2)
> ......... log(10)].
>
> Thanks and Regards,
> Harshit Patel
> Contact No. : - 8511800258

Hello Hashit

I am not familiar with this compression technique and I might
misunderstood your mail.
If you want a matrix M with elements M(i,j) = log (A(i,j)), you just
do M = log (A) in Octave or matlab, because functions (unless stated
otherwise) work element-wise.
Your example, is easily solved like this:
# x = log(1):log(10)
x = log (1:10);

If this is not what you meant feel free to give me a better explanation

JPi



reply via email to

[Prev in Thread] Current Thread [Next in Thread]