How to take a given value from a table in a function?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Emilia
am 30 Dez. 2020
Beantwortet: Walter Roberson
am 30 Dez. 2020
Hello,
For example I have a table given
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/474648/image.png)
I calculate a=y/l , For example a=y/l=2 so i need to get g=0.2.
If i get a=y/l=1 (Out of the table) it should be equal g=0.2. Also in the bottom a=y/l=6 => g=0.5.
I did it in function and does not succeed.
Thanks for the helpers
function [g] = func(y, l)
a=y/l
end
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Tables 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!