Filter löschen
Filter löschen

Increasing Automation with FunctionsFunction Files(4/4) Vectorizing the Comparison Function

21 Ansichten (letzte 30 Tage)
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
  4 Kommentare
Hessa Alhassan
Hessa Alhassan am 9 Nov. 2023
Verschoben: Cris LaPierre am 9 Nov. 2023
Problem in "Increasing Automation with Functions > comparing using tolerance > (3/4)

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Cris LaPierre
Cris LaPierre am 11 Apr. 2023
Bearbeitet: Cris LaPierre am 11 Apr. 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.

Weitere Antworten (1)

Abhijeet
Abhijeet am 4 Apr. 2023
Hi,
You can call the function isequaltol_vec in comparewithtol.mlx script using the below code :
eqxz = isequaltol_vec(x,z,1e-5)
Thanks
  5 Kommentare
Cris LaPierre
Cris LaPierre am 28 Mär. 2024
It appears to be working. Please share a screen shot of your attempt with the errors showing.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Problem-Based Optimization Setup finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by