Enter the following code
(1)
a = [1 2;3 4];
a(6) = 7;
Prompt:
attempt to grow array along ambiguous dimension.
in Chinese:
attempt to grow large array along fuzzy dimension
The following codes are correct
(2)
a = [1 2;3 4];
a(5, 8) = 7;
Why is it that code (1) is wrong and code (2) is at a loss when it exceeds the predefined matrix size?
The cause of the problem is as indicated in the prompt
, the program cannot determine the dimension of the matrix.
What do you mean?
Although the code segment (2) exceeds the predefined matrix dimension: 2-by-2, it can determine the matrix dimension after an assignment (a (5, 8) = 7): 5-by-8.
The code segment (1) is a linear index -- 6, which is converted to a matrix subscript of 2-by-3 or 3-by-2??
The computer doesn't know, so it reports an error. " attempts to grow data along fuzzy dimensions
". This tip, feel very awkward, in fact, is very correct .
Read More:
- Command prompt window prompt system error 5, access denied?
- New user’s shell, delete prompt ^ H, up and down prompt ^ A ^ B, tab key is useless
- matlab Error Subscript indices must either be real positive integers or logicals.
- Zend studio HTML error prompt close, PHP “error prompt” open and close the correct way
- The usage of Matlab function downsample
- How to use matlab xlswrite
- Matlab — looking for peak function
- Matlab matrix transpose function
- Debugging mode of MATLAB: dbstop if error
- Countermeasures for Error 1935 when installing MATLAB under Windows 10
- How to wrap a long string in MATLAB
- Matlab draw logarithmic coordinates!
- Matlab shows license manager error – 103
- How to Solve differential equations with MATLAB
- Matlab 2018a cracked the licensing error: – 8523
- Usage of pause function in MATLAB
- Error starting desktop problem when installing matlab on windows7
- Matlab: Three forms of random number generated (Rand, Randi and Randn)
- Matlab im show squeeze
- array initization in matlab zeros(1000)