Complex waves error

Greetings forum,

I have a form (Cos6A+iSin6A) each Cos6A and Sin6A.

Below is a part of my code which is inside a for loop:

 

Variable/C ci = sqrt(-1)
.
.
.
.
.
string Angs= "Angs"+num2str(b)
    					 	
     		Duplicate/o root:tryFolders:tests:$(EachPointFolder):$Angles , root:tryFolders:tests:$(EachPointFolder):$Angs
     		wave Angles_each = root:tryFolders:tests:$(EachPointFolder):$Angs
     		Angles_each = atan(DifferenceY[p]/DifferenceX[p])*180/Pi
     					 		
     					 		
     		string Angs6= "6_Angs"+num2str(b)
    					 	
     		Duplicate/o root:tryFolders:tests:$(EachPointFolder):$Angles , root:tryFolders:tests:$(EachPointFolder):$Angs6
     		wave Angles_each6 = root:tryFolders:tests:$(EachPointFolder):$Angs6
     		Angles_each6 = 6*Angles_each
     					 		
     					 		
     					 		
     		string cosAng= "CosAngs"+num2str(b)
    					 	
     		Duplicate/o root:tryFolders:tests:$(EachPointFolder):$Angles , root:tryFolders:tests:$(EachPointFolder):$cosAng
     		wave Cos_Angles = root:tryFolders:tests:$(EachPointFolder):$cosAng
     		Cos_Angles = cos(Angles_each6)*180/Pi
     					 		
     		
     					 		
     		string sinAng= "SinAngs"+num2str(b)
    					 	
     		Duplicate /o root:tryFolders:tests:$(EachPointFolder):$Angles , root:tryFolders:tests:$(EachPointFolder):$sinAng
     		wave Sin_Angles = root:tryFolders:tests:$(EachPointFolder):$sinAng
     		Sin_Angles = ci*sin(Angles_each6)*180/Pi
     					 		
     					 		
     		string iSin= "iSin"+num2str(b)
    					 	
     		Duplicate/o root:tryFolders:tests:$(EachPointFolder):$Angles , root:tryFolders:tests:$(EachPointFolder):$iSin
     		wave i_sin = root:tryFolders:tests:$(EachPointFolder):$iSin
     		//i_sin = (ci)*Sin_Angles
     					 		
     					 		
     		string Complexi= "Cmplx"+num2str(b)
     		make /c/n=(numpnts($iSin)) root:tryFolders:tests:$(EachPointFolder):$Complexi
     		wave Complex_wave=root:tryFolders:tests:$(EachPointFolder):$Complexi
     							
     		Complex_wave= cmplx(Cos_Angles,Sin_Angles)
.
.
.

 I get the following error: Function is not available for this number type:

Attached image shows how the waves looks without cmplx(Cos_Angles,Sin_Angles)

 

Thanks a lot

 

error cmplx

For starters, your wave declaration should be:

Wave/C Complex_wave=...

Forum

Support

Gallery

Igor Pro 10

Learn More

Igor XOP Toolkit

Learn More

Igor NIDAQ Tools MX

Learn More