Error when a function is running
    2 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    William
 el 13 de Dic. de 2023
  
    
    
    
    
    Respondida: Walter Roberson
      
      
 el 13 de Dic. de 2023
            I ran this code in MATLAB online and it is giving me the result for out1,out2,out3. But when I run it in MATLAB Mobile is giving me an error saying "Unrecognized function or variable 'calculator'. How can I run this code on MATLAB Mobile and still get out1,out2,out3.
This is the Code: 
x = [3 6 9 6 3];
y = 2:6;
z = 4;
[out1,out2,out3] = calculator(x,y,z)
function [a1,a2,a3] = calculator(one,two,three)
a1 = one./two;
if two(1)<=three
    a2 = two(1):three;
else
    a2 = two(1):-1:three;
end
a3 = a1/three;
end
0 comentarios
Respuesta aceptada
  Walter Roberson
      
      
 el 13 de Dic. de 2023
        You need to store that in a file to run it on MATLAB Online (or MATLAB Mobile)
0 comentarios
Más respuestas (0)
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!