Borrar filtros
Borrar filtros

How to rectify the following code

1 visualización (últimos 30 días)
ESWARA MOORTHI
ESWARA MOORTHI el 28 de Oct. de 2012
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

Respuestas (1)

Wayne King
Wayne King el 28 de Oct. de 2012
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.

Categorías

Más información sobre Material Sciences en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by