Info

This question is closed. Reopen it to edit or answer.

How to fix Incorrect Code

1 view (last 30 days)
Veda Surapaneni
Veda Surapaneni on 7 Oct 2020
Closed: MATLAB Answer Bot on 20 Aug 2021
Hi, my code is not giving me a valid output, but I am new to MatLab and am unsure how to fix it. The output I require is a voltage range given the input values shown.
LDR1 = input('smallest specified resistance value');
LRD2 = input('largest specified resistance value');
R1 = input ('resistance calculated from Code 2');
V = 5
function V1
V1 = V*R1/(R1+LDR1);
end
function V2
V2 = V*R1/(R1+LDR2);
end
Volt_Range = [V2 V1];
Help would be greatly appreciated.

Answers (0)

Community Treasure Hunt

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

Start Hunting!