Thx for the reply and sorry for being late in replying back, i admit that i'm stupid enough that I actually didn't open up the mycgimagic.m file and have a look to it's content.
Anyway, I am now creating a new algorithm, which is to calculate the square of a number (power of 2) by modeling to the sample m.file given in mycgimagic.m, I somehow stuck halfway and I can't pass back my result entirely, only the header is showing back. here is the coding
function firstdeploy() input = (getenv('QUERY_STRING')); printHeader() x=str2double(input.size); sqre(x); printContent() printFooter() end function sqre = sqre(x) sqre = (x^2); end function printHeader() fprintf(1,'Content-type: text/html\n'); fprintf(1,'\n'); %Print the HTML response page to STDOUT. fprintf(1,'<HTML>'); fprintf(1,'<HEAD><TITLE>My Squaring</TITLE></HEAD>'); fprintf(1,'<BODY>'); end function printContent() fprintf(1,'<P>This is the square of your input:</P>'); fprintf(1, sqre(x)); end function printFooter() fprintf(1,'</BODY>'); fprintf(1,'</HTML>\n'); end
I hope that any guru and masters here can point out my mistakes, I'm still very new to programming, willing to learn more about it. Sorry for any inconvenience caused
In reply to Re^2: Linking Matlab to process data for Personal Web Server
by jyws89
in thread Linking Matlab to process data for Personal Web Server
by jyws89
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |