フィルターのクリア

How to solve the error?

2 ビュー (過去 30 日間)
Darsana P M
Darsana P M 2018 年 3 月 25 日
コメント済み: Image Analyst 2018 年 3 月 26 日
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?
  1 件のコメント
Rik
Rik 2018 年 3 月 25 日
What you want is not possible. How should Matlab concatenate two variables of totally different dimensions and even different file types?
The question is why you want to do this. Maybe we can help you solve that problem.

サインインしてコメントする。

採用された回答

Image Analyst
Image Analyst 2018 年 3 月 25 日
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.
  10 件のコメント
Darsana P M
Darsana P M 2018 年 3 月 25 日
Can I now combine them after making then as structures??
Image Analyst
Image Analyst 2018 年 3 月 26 日
I'm not sure how you want to combine then. You can combine different structures, but you can't combine two totally different things. Let's say the 4-D things is a video, in other words a series of multiple 3-D images. They are 3-D because they are color, and 4D because at each point in time we have a new/different RGB image. Now let's say you have a gray scale 2-D image and you want to "combine it". Well how? Do you want to add it as a frame to the end of the video? You can't, unless you turn it into a 3-D array, like an RGB image. If you do THAT you can do it, but otherwise you can't. It's basically the same for your situation. You can't combine a 2-D array with a 4-D array directly. You need to do something to allow the concatenation/combination, but you have not said HOW. You can't just do it without saying how to do it.

サインインしてコメントする。

その他の回答 (0 件)

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by