MATLAB: How to solve the error

error

iop=cat(4,CIPH,TAGG'); I got this error:
Error using cat
Dimensions of matrices being concatenated are not consistent.
Error in encryyyy (line 239)
iop=cat(4,CIPH,TAGG');
I would like to combine: CIPH and TAG
whos TAG
Name Size Bytes Class Attributes
TAG 16x2 64 char
>> whos CIPH
Name Size Bytes Class Attributes
CIPH 4-D 7296 cell
How to solve this?
I am working on cryptography, AES-GCM algorithm. As output, I get cipher text and tag. I want to combine them at output. I found this operation 'cat to combine texts. What is the other alternative to do this?

Best Answer

Depends on what you want. You could assign it to a field in a structure. You could write them to a character array. You could put them into cells of a cell array. You could write the variables to a .mat file, etc.