AMMCLIB COS_FLT wave fault

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AMMCLIB COS_FLT wave fault

Jump to solution
415 Views
Chris_Tigger
Contributor III

Hi, 

I've encountered a very strange problem. When using the Simulink model of the AMMCLIB library, the output of the floating-point cosine function has spikes. Why is this? I can use the sin function and the cos function in the Simulink standard library normally.I hope to get your help.

Chris_Tigger_0-1754322560482.png

matlab version : 2025a

AMMCLIB version: 1.1.22

Best Regards!
Chris Tigger
0 Kudos
Reply
1 Solution
396 Views
Chris_Tigger
Contributor III
The input can be -pi ~pi ,I think.
Best Regards!
Chris Tigger

View solution in original post

0 Kudos
Reply
1 Reply
397 Views
Chris_Tigger
Contributor III
The input can be -pi ~pi ,I think.
Best Regards!
Chris Tigger
0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2146276%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EAMMCLIB%20COS_FLT%20wave%20fault%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2146276%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EI've%20encountered%20a%20very%20strange%20problem.%20When%20using%20the%20Simulink%20model%20of%20the%20AMMCLIB%20library%2C%20the%20output%20of%20the%20floating-point%20cosine%20function%20has%20spikes.%20Why%20is%20this%3F%20I%20can%20use%20the%20sin%20function%20and%20the%20cos%20function%20in%20the%20Simulink%20standard%20library%20normally.I%20hope%20to%20get%20your%20help.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Chris_Tigger_0-1754322560482.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Chris_Tigger_0-1754322560482.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F350829i736C52DC73E62B65%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Chris_Tigger_0-1754322560482.png%22%20alt%3D%22Chris_Tigger_0-1754322560482.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3Ematlab%20version%20%3A%202025a%3C%2FP%3E%3CP%3EAMMCLIB%20version%3A%201.1.22%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2146541%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%20AMMCLIB%20COS_FLT%20wave%20fault%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2146541%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EThe%20input%20can%20be%20-pi%20~pi%20%EF%BC%8CI%20think.%3C%2FLINGO-BODY%3E