Archive for November, 2008

Matrix by Vector multiplication in Matlab

Posted in Uncategorized on November 18, 2008 by aghoras

Lets say we have a vector (v) of size 1xn and a matrix (a) of size mxn.  If we want to multiply every row in the matrix by the vector, we can do the following:

j=repmat(v,m,1);

Then do to get the answer

a.*j

Apache and SE Linux

Posted in Linux on November 4, 2008 by aghoras

To allow apache to access /www:

chcon -R -t httpd_sys_content_t /www

to check the results:

ls -alZ /www

you should get something that looks like:

-rw-r–r–  root root system_u:object_r:httpd_sys_content_t:s0 index.html
-rw-r–r–  root root system_u:object_r:httpd_sys_content_t:s0 index.php

Type “man httpd_selinux” for a full description of available contexts.