Solving an equation with multiple values

Hello! I'm trying to figure out how to go about this:
Basically, I have an equation and I want to solve it using a = 0.1:0.1:12;
I want to display all the answers from 0.1, 0.2, 0.3, ... , 12 but when I run my code, it says error in line 2 which is the line with f1. Am I doing something wrong?
% Values of a = 0.1, 0.2, 0.3, ..., 12
a = 0.1:0.1:12;
% Formula for Critical Stress wherein E = 69 GPa and y = 0.3
f1 = ((2*69*0.3)/(pi*a))^0.5;
solve(f1)

 採用された回答

VBBV
VBBV 2022 年 10 月 5 日

0 投票

f1 = ((2*69*0.3)./(pi*a))*0.5;

2 件のコメント

VBBV
VBBV 2022 年 10 月 5 日
Use the element wise operator for division. ./
Hyunji Park
Hyunji Park 2022 年 10 月 5 日
I see that now, thank you!

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangePhysics についてさらに検索

タグ

質問済み:

2022 年 10 月 5 日

コメント済み:

2022 年 10 月 5 日

Community Treasure Hunt

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

Start Hunting!

Translated by