How to rectify the following code

1 次查看(过去 30 天)
ESWARA MOORTHI
ESWARA MOORTHI 2012-10-28
Respected Sir/Madam
Please give the ideas about How to rectify the following Error code after the 25th iterations in my program.
??? Error using ==> reshape To RESHAPE the number of elements must not change.
Error in ==> sym.maple at 94 result = reshape(result,size(varargin{3}));
Error in ==> sym.int at 39 r = reshape(maple('map','int',f(:),x),size(f));
Error in ==> Esu at 55 f1(m)=vpa(h1*int(exp(t)*int(exp(-2*t)*int(exp(t)*R1(m-1))))+g(m-1)*f1(m-1),5);
Thanking you
with regards S.Eswaramoorthi

回答(1 个)

Wayne King
Wayne King 2012-10-28
The problem is that you are attempting to reshape a vector but you are changing the number of elements. For example:
x = randn(100,1);
y = reshape(x,20,5);
works because (20)(5) = 100
but
x = randn(100,1);
y = reshape(x,21,5);
generates the error you are getting. The same principle applies for symbolic arrays.

类别

Help CenterFile Exchange 中查找有关 Signal Integrity Kits for Industry Standards 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by