what is the correct way to write this expression in matlab?
4 views (last 30 days)
Show older comments
Anuradha on 24 Jan 2023
Commented: Star Strider on 25 Jan 2023
f=sqrt((1/(L*C)-(R.^2)/((4*C).^2))); correct way to write the expression in matlab?
Dyuman Joshi on 24 Jan 2023
We don't know, because we don't know the reference for the expression.
Please give more information or provide reference formula.
Star Strider on 24 Jan 2023
If ‘R’, ‘L’, and ‘C’ are all arrays of the same size, use element-wise operations in every multiplication, division, and exponentiation operation —
f = sqrt((1./(L.*C)-(R.^2)./((4*C).^2)));
See Array vs. Matrix Operations for details.
Star Strider on 25 Jan 2023
If my Answer helped you solve your problem, please Accept it!
Jiri Hajek on 24 Jan 2023
Moved: Image Analyst on 24 Jan 2023
We can only see, if the expression is written corretly to allow evaluation by MATLAB:
Find more on Get Started with MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!