I'm trying to take the integral with two variables being arrays and this error keeps popping up. I'm not sure if there is another way, or if im missing something. this is what i have put in the code.
    4 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    Danielle Guariglia
 el 2 de Dic. de 2020
  
    
    
    
    
    Respondida: David Hill
      
      
 el 2 de Dic. de 2020
            syms x 
h = 0.5:0.1:5.0;
b = 0.5:0.1:5.0;
dA = (h./(b.^3))*x^3
Iy = int(dA*x^2,x,0,b)
Error using symengine
Invalid argument.
Error in sym/int (line 167)
   rSym = mupadmex('symobj::intdef',f.s,x.s,a.s,b.s,options);
Error in DanielleG_Assignment4_18 (line 16)
Iy = int(dA*x^2,x,0,b)
0 comentarios
Respuesta aceptada
  Setsuna Yuuki.
      
 el 2 de Dic. de 2020
        
      Editada: Setsuna Yuuki.
      
 el 2 de Dic. de 2020
  
      I think the upper limit of integral cannot be a matrix.
if you change
Iy = int(dA*x^2,x,0,b) %b is array 
the code works
syms x
h = 0.5:0.1:5.0;
b = 0.5:0.1:5.0;
B = 2; %limit of example
dA = (h./(b.^3))*x^3
Iy = int(dA*x^2,x,0,B) 
0 comentarios
Más respuestas (1)
  David Hill
      
      
 el 2 de Dic. de 2020
        Iy=h.*b.^3/6;%not a difficult integral, just do it yourself.
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


