formulas and + or - a percentage

5 ビュー (過去 30 日間)
ELISABETTA BILLOTTA
ELISABETTA BILLOTTA 2023 年 3 月 2 日
回答済み: DUY Nguyen 2023 年 3 月 2 日
I have a variable V0 (1x6313 double) (i attached)
-I must first calculate Vij where the minor extreme is Vi=V0-10% and the major extreme is Vj=V0+10%
-Then I have to calculate this formula
abs((Vij-V0)/V0)< 15%
Can anyone help me?

回答 (1 件)

DUY Nguyen
DUY Nguyen 2023 年 3 月 2 日
Hi,
Hope this could help you
% Load the V0 variable
load('V0.mat'); % assuming the file is in the current directory
% Calculate Vij with minor and major extremes
Vi = 0.9 * V0; % minor extreme
Vj = 1.1 * V0; % major extreme
Vij = [Vi; Vj];
% Calculate the condition
cond = abs((Vij - V0) ./ V0) < 0.15;
% Display the result
disp(cond);

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by