The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 MATREPL_TEST_LESSTHAN compiling error

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
thamizh Posted - 03/04/2013 : 04:45:13 AM
Origin Ver.8.6 and Service Release 2 (Select Help-->About Origin):
Operating System:Windows XP

When I tried to use this Folowing function,

thamizh.Replace(1.0e-7, 0, MATREPL_TEST_LESSTHAN | MATREPL_USE_ABSOLUTE_VALUE_IN_TEST);

I get the compiling error: "Error, Incompatible variable types in expression"

I have been using this function since Origin 7.5 in those cases I did not get this error.

Can anyone help how to get rid this compilation error..?

Let me thank you in advance,

Best,
Thamizhavel.
3   L A T E S T    R E P L I E S    (Newest First)
Penn Posted - 03/05/2013 : 01:56:22 AM
Hi Thamizhavel,

The code you provided works fine, here is how I use your code:

#include <origin.h>
#include <oc_nag.h>
void test_replace()
{
	int n;
	n = 6;
	
	double tda, tdv;
	tda = n;
	tdv = n;
	
	matrix dcef;
	dcef.SetSize(n, n);
	
	matrix thamizh;
	thamizh.SetSize(n, n);
	
	vector valsz;
	
	NagError err;
	nag_real_symm_eigensystem(n, dcef, tda, valsz, thamizh, tdv, &err);
	
	thamizh.Transpose(); 
	thamizh.Replace(1.0e-7, 0, MATREPL_TEST_LESSTHAN | MATREPL_USE_ABSOLUTE_VALUE_IN_TEST);
}

You can try to see whether it is fine or not.

Penn
thamizh Posted - 03/05/2013 : 12:06:33 AM
Hi Penn

Thanks for your reply. yes you are correct, I have already declared thamizh as a matrix. The code is too long to post here. I am posting a part of my code where I get the error message:


Part of my code goes like this:

int n;
n = 6;

double tda, tdv;
tda = n;
tdv = n;

matrix dcef;
dcef.SetSize(n, n);

matrix thamizh;
thamizh.SetSize(n, n);

vector valsz;

NagError err;
nag_real_symm_eigensystem(n, dcef, tda, valsz, thamizh, tdv, &err);

thamizh.Transpose();
thamizh.Replace(1.0e-7, 0, MATREPL_TEST_LESSTHAN | MATREPL_USE_ABSOLUTE_VALUE_IN_TEST);


I am getting the compiling error for the line :

"thamizh.Replace(1.0e-7, 0, MATREPL_TEST_LESSTHAN | MATREPL_USE_ABSOLUTE_VALUE_IN_TEST);"


The compilation error message: "Error, Incompatible variable types in expression"

This code was compiling without any problem for Origin 8. For origin 8.6 it is not compiling

- Thamizhavel.
Penn Posted - 03/04/2013 : 9:25:37 PM
Hi Thamizhavel,

With just your one line code, I declare thamizh as matrix or vector, neither has the compilation error in Origin 8.6. Better that you can provide the whole code for compilation.

Penn

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000