cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Error: Array Dimensions dont match

ptc-5051640
1-Newbie

Error: Array Dimensions dont match

Hiya,

Iam trying to copy data from any array/vector into another array but on different indexes.

But I receive error"array dimension dont match". My code is attached below.


error2.jpg

1 ACCEPTED SOLUTION

Accepted Solutions

Try to select with the cursor on the left and use the forward delete not the backward delete.

Alan

View solution in original post

10 REPLIES 10
LucMeekes
23-Emerald III
(To:ptc-5051640)

Hi,

The error may have several causes, among which the lengths of the vectors Socket, signal and Sum, and the values of packet_len and L.

If you can, please attach the Mathcad sheet.

Why do you repeatedly set x equal to 6 in the for-loops?

Luc

I have cleared that problem but now I cant print double dimensions array, the mathcad crashes.

error3.jpg

LucMeekes
23-Emerald III
(To:ptc-5051640)

Can't judge from a picture, please attach Mathcad sheet.

Luc

Iam uploading my code file.

I don't think you uploaded the right file. The line in the file, corresponding to ste <- correl(Socket, Sum) above, actually has ste <- correl(socket, signal)

Alan

Thanks for your reply. Ya I mixed the file.

But I have corrected the fault, the problem is now that it is showing right answer and everything working fine

but all the loop is turned red and there is an error shown "mpl_exception" . How can I turn i back to black instead of red.

Regards.

Delete the = sign to the top right of the routine. Instead, put time_err:= the routine on the left (ie assign the output to a variable), then display time_err below the routine (ie put time_err= below) in order to see the results.

Alan

I tried to delete "=" sign on top right but it then delete time_err:= also.

Try to select with the cursor on the left and use the forward delete not the backward delete.

Alan

Thanks it solved it. Now there is a star on top right but nothing wrong with the code.

Regards.

Top Tags