Don t know how to write formula

  • Thread starter Thread starter johnny_mc
  • Start date Start date
  • Tags Tags
    Formula
Click For Summary
SUMMARY

The discussion focuses on writing formulas in MATLAB, specifically addressing the correct syntax for mathematical functions. Users are advised to use open brackets only, replace "arc sin" with "asin", and ensure multiplication is explicitly denoted with an asterisk (*). An example formula provided illustrates the correct format for implementing these guidelines in MATLAB.

PREREQUISITES
  • Basic understanding of MATLAB syntax and functions
  • Familiarity with trigonometric functions such as asin and acos
  • Knowledge of mathematical notation for multiplication
  • Experience with writing and debugging equations in programming environments
NEXT STEPS
  • Review MATLAB documentation on mathematical functions and syntax
  • Practice writing and debugging complex equations in MATLAB
  • Explore MATLAB's help resources for trigonometric functions
  • Learn about vectorized operations in MATLAB for efficient calculations
USEFUL FOR

Beginners in MATLAB, students learning mathematical programming, and anyone needing assistance with writing and debugging formulas in MATLAB.

johnny_mc
Messages
2
Reaction score
0
Hi, i have a problem with MATLAB, i just start to use it, and i desperately need help.
Can anyone help me, how can i wrote this formula :

r[1-cos[arc sin (sqrt(2.*R.*DR+DR.^2)+r sin(arc cos (r-k)/r) /r)]]-k

:smile:
 
Physics news on Phys.org
Hi, you may refer to help in Matlab for writing equations. I can give few points
Matlab accepts only open brackets () and not closed brackets in equations.
write arc sin(x) as asin(x)

Always use * for multiplication of two variables and even with brackets
For example k(x+1)(x+2) as k*(x+1)*(x+2)

Hope this helps
 
hi, i wrote equations like this but it did not help, h = r.*(1-cos(asin((sqrt(2.*R.*DR+DR.^2))+r.*sin(acos(r-k)./r)./r)))-k
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 6 ·
Replies
6
Views
7K
  • · Replies 6 ·
Replies
6
Views
4K
Replies
5
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K