필터 지우기
필터 지우기

Matlab giving error for tall array assignment

조회 수: 3 (최근 30일)
Maggie Chong
Maggie Chong 2023년 6월 25일
댓글: Paul 2023년 6월 26일
Hello,
I need to use tall arrays because MATLAB is running out of memory due to the size of my V matrix ( there is a long checking and filling sequence using a random sequential adsoprtion algorithm) after the bit of code I am including here. How do I fix this error?
rng(69)
n = 10;
grid = 3;
% Coupon dimensions
Length = 76;
Width = 25;
mesh_size =1;
% Coupon dimensions
[X,Y] = meshgrid(-Length:mesh_size:Length, -Width:mesh_size:Width);
% Coupon dimensions
[X3,Y3,Z3] = meshgrid(-grid:mesh_size:grid, -grid:mesh_size:grid, 1:n);
Error using grid
Too many output arguments.
S = zeros(size(X));
smallV = zeros(size(X, 1), size(X, 2), n);
V = tall(V);
A = V;
Error using tensiletest
Argument 1 to SUBSASGN must be one of the following data types: logical.

답변 (1개)

Paul
Paul 2023년 6월 25일
The code doesn't define a variable named grid. It's getting confused with the function grid
  댓글 수: 2
Maggie Chong
Maggie Chong 2023년 6월 26일
Hello! I forgot to include it in the questions, the grid element is actually defined.
Paul
Paul 2023년 6월 26일
Now that the variable grid is defined, we have a new problem. The variable V is not defined.
rng(69)
n = 10;
grid = 3;
% Coupon dimensions
Length = 76;
Width = 25;
mesh_size =1;
% Coupon dimensions
[X,Y] = meshgrid(-Length:mesh_size:Length, -Width:mesh_size:Width);
% Coupon dimensions
[X3,Y3,Z3] = meshgrid(-grid:mesh_size:grid, -grid:mesh_size:grid, 1:n);
S = zeros(size(X));
smallV = zeros(size(X, 1), size(X, 2), n);
V = tall(V);
Unrecognized function or variable 'V'.
A = V;

댓글을 달려면 로그인하십시오.

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by