March 31st, 2010 09:55 PM
float crocor(float a[], float b[]){
float numerator=0;
float denominator=0;
float t1=0,t2=0,t3=0,t4=0,t5=0;
for(int i=0; i<=SCANRAD; i++){
t1+=a[i]*b[i];
t2+=a[i];
t3+=b[i];...
March 31st, 2010 11:42 AM
I was aiming for a range of 24X24.
I found a file through Google:
http://users.erols.com/mdinolfo/matrix.htm
He's shown an example with 200x200. In that regard I have a naive question to ask:
March 31st, 2010 12:08 AM
I need to find the inverse of a matrix which contains floating point numbers. Can anyone share an efficient (w.r.t. time) code?
March 31st, 2010 12:05 AM
March 30th, 2010 10:12 PM
void scanimg(IplImage *scnimg){
for(int k=0; k<SCL_NUM; k++){
ofstream localfile;
char s1[20];
std::stringstream ss1;
ss1<<k<<".csv";
s1=ss1.str();
localfile.open(s1);
for(int...
March 29th, 2010 10:19 AM
Thanks! Those links are real good.
I have tried asking people about resources on good tips. But I end up getting unrelated answer. This time again, it seems, my example was wrong but those links...
March 28th, 2010 07:36 PM
Forgive this naive question:
Of what use is the "bookmark a line" option in VS2008?
Please tell if you know any good programming practices in VS2008. To clarify I would like to give an example:...
March 24th, 2010 01:35 PM
March 24th, 2010 09:16 AM
My apologies.
Here's the actual code:
void temp_match_img::makevec(){
if(radpix_set==0) cout<<"The values of the radpix[] array have not yet been calculated!\n";
assert(radpix_set);
int...
March 24th, 2010 08:58 AM
@alexibm
That was a hilarious post but on a serious note such has been the scene in my case too.
Currently I am somewhat comfortable with debugging, but the question I would like to put forth is...
March 23rd, 2010 10:40 PM
void display()
{
char ch;
int i, j, side;
cout<<"Enter character and side"<<endl;
cin>>ch>>side;
cout<<endl;
for(int i=0; i<side/2; i++)
{
March 23rd, 2010 08:47 PM
assert() is a good way to notify errors but I want to cout an elaborate message.
Of course the following method will work but I needed something better:
if(error){
cout<<"Elaborate message";...
March 23rd, 2010 08:43 PM
Oh.. ok. I was a bit concerned about the lower values. I guess if I manually enter the lower values the higher values can be estimated with reasonable accuracy as you have shown.
March 23rd, 2010 06:26 PM
Sorry guys, by "in circle" I meant in the set represented by the circle. Basically the circumference.
The answer is not very close to 2*(pi)*r - neither is the answer for the number of pixels...
March 23rd, 2010 03:40 PM
I have written the following code to derive find out the average intensities at a given radius from the center of an array.
void temp_match_img::makevec(){
int temp;
for(int i=-radius;...
March 23rd, 2010 08:01 AM
@CILU:
Thanks! I will remember this one.
March 22nd, 2010 07:18 PM
I know the following will look weird but I am simply not able to understand how string passing works.
#include<iostream>
#include<ctype.h>
#include<fstream>
using namespace std;
void...
March 22nd, 2010 08:10 AM
Thanks! But what is the resource folder for?
March 22nd, 2010 07:51 AM
When I create an empty Win32 application in VC++, I see 3 folder icons to my left (in the environment):
Header files
Resource files
Source files
I create main.cpp in the "source files" and a...
March 21st, 2010 10:38 PM
Thanks! So basically it's the best to be as clear as possible - esp. if one is ready to punch in those extra characters.
Please correct if wrong.
March 21st, 2010 07:46 PM
#include <iostream>
int a[20][20];
int main()
{
std::cout << a[9] << "\n";
std::cout << &a[9] << "\n";
std::cout << &a[9][0] << "\n";
system("pause");