Increasing Automation with FunctionsFunction Files(4/4) Vectorizing the Comparison Function
21 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Alexander Reina Garzon
el 26 de Mzo. de 2023
Comentada: Cris LaPierre
el 28 de Mzo. de 2024
From the script (comparewithtol.mlx), call the isequaltol_vec function with a single output to determine if x and z are within 1e-5 of each other. Store the result in a logical variable called eqxz. I don't have only this activity. Thanks![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1336819/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1336819/image.png)
4 comentarios
Hessa Alhassan
el 9 de Nov. de 2023
Movida: Cris LaPierre
el 9 de Nov. de 2023
Problem in "Increasing Automation with Functions > comparing using tolerance > (3/4)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1535125/image.png)
Cris LaPierre
el 9 de Nov. de 2023
Movida: Cris LaPierre
el 9 de Nov. de 2023
Respuesta aceptada
Cris LaPierre
el 11 de Abr. de 2023
Editada: Cris LaPierre
el 11 de Abr. de 2023
Have you noticed that there are 2 live scripts open? comparewithtol.mlx and isequaltol_vec.mlx.
You need to switch to the comparewithtol.mlx live script and enter you solution into the Task 2 code block.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1351464/image.png)
Más respuestas (1)
Abhijeet
el 4 de Abr. de 2023
Hi,
You can call the function isequaltol_vec in comparewithtol.mlx script using the below code :
eqxz = isequaltol_vec(x,z,1e-5)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1344854/image.jpeg)
Thanks
5 comentarios
Cris LaPierre
el 28 de Mzo. de 2024
It appears to be working. Please share a screen shot of your attempt with the errors showing.
Ver también
Categorías
Más información sobre Problem-Based Optimization Setup en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!