What is the problem with the below code?

Why is MATLAB displaying an error for me with this code:
%Calculate the percenatge difference:
diff20 = (drugs20 - placebo20)./ placebo20 * 100;
diff30 = (drugs30 - placebo30)./ placebo301 * 100;
diff = (drugs - placebo)./ placebo * 100;

Antworten (1)

VBBV
VBBV am 14 Mär. 2023

1 Stimme

diff30 = (drugs30 - placebo30)./ placebo30 * 100;

3 Kommentare

VBBV
VBBV am 14 Mär. 2023
The variables placebo301 doesn't exist. May be it's placebo30 instead
Roa
Roa am 14 Mär. 2023
Bearbeitet: Roa am 14 Mär. 2023
Yeah sorry that was a typo i fixed it but still displays error
Rik
Rik am 14 Mär. 2023
Try to make a MWE so we can run your code without any other dependencies and can reproduce your issue. The best way to do this is to use the code section in the editor and use the run button. That way you can make sure we will see the same error message as you do.
The information that Matlab "still displays error" is not enough to help you.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Parallel Computing finden Sie in Hilfe-Center und File Exchange

Gefragt:

Roa
am 14 Mär. 2023

Kommentiert:

Rik
am 14 Mär. 2023

Community Treasure Hunt

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

Start Hunting!

Translated by