so I tried this for the first time and I'm actually kinda proud (still new at this) but its not working completely like I would like it to.
I created a function with a for loop inside of it that takes a 1d array of any length and converts it to its hash equivalent. but it only works for numerical values and not letters or words. the arrays that I want to convert has letters as well. so I tried to convert the array inside of the function into its ascii value but it won't let me.
so here's the loop
function [h]=converter(array1)
double(array1)
n=length(array1);
i=1;
h=0;
for i=1:1:n
h=array1(i)+31*h;
end
end
instead of double (array1) I tried double('array1') but I think it assumed that I was trying to convert the input title array1 to ASCII form, is there a way of converting it inside a function or will it have to be done before the function or loop starts?
