フィルターのクリア

easy math question for you but ı dont know to solve it.

4 ビュー (過去 30 日間)
Murathan Cuya
Murathan Cuya 2020 年 6 月 18 日
編集済み: Murathan Cuya 2020 年 6 月 21 日
please write MATLAB code to find the result of equation
ı need codes and matlab script
  2 件のコメント
darova
darova 2020 年 6 月 18 日
Have you tried something? What problems are facing?
Atul Upadhyay
Atul Upadhyay 2020 年 6 月 18 日
To solve this problem efficiently you can use abs(x) function available in MATLAB.
So, the code is
y=abs(x);
You can refer to the following documentation for more details.

サインインしてコメントする。

採用された回答

Murathan Cuya
Murathan Cuya 2020 年 6 月 19 日
編集済み: Murathan Cuya 2020 年 6 月 21 日
% Murathan CUYA
% 180401034 Aerospace engineering grade 1
clear
clc
x=input('tell me the number and ı will say you the answer :)type here=');
if(x<0)
y=-1*x;
else
y=x;
end
fprintf('the answer for the number that you typed is:')
disp(y)

その他の回答 (1 件)

Atul Upadhyay
Atul Upadhyay 2020 年 6 月 19 日
To solve this problem efficiently you can use abs(x) function available in MATLAB.
So, the code is
y=abs(x);
You can refer to the following documentation for more details.

カテゴリ

Help Center および File ExchangeGraphics Object Programming についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by