Question for using root function. (2024)

16 views (last 30 days)

Show older comments

Trong Nhan Tran on 18 May 2024

  • Link

    Direct link to this question

    https://webchat.mathworks.com/matlabcentral/answers/2120241-question-for-using-root-function

  • Link

    Direct link to this question

    https://webchat.mathworks.com/matlabcentral/answers/2120241-question-for-using-root-function

Edited: Trong Nhan Tran on 20 May 2024

Open in MATLAB Online

% Using the MATLAB function “roots” for find non-zero natural frequencies

% define symbolic variable w

syms w;

% Given parameters

m1 = 1.8; m2 = 6.3; m3 = 5.4; m4 = 22.5; m5 = 54;

c2 = 10; c3 = 0.5; c4 = 1.50; c5 = 1.1;

k2 = 100000; k3 = 50; k4 = 75; k5 = 10;

% Set up system matrices

% mass matrix

M = diag([m1, m2, m3, m4, m5]);

% damping matrix

C = [c2 -c2 0 0 0;

-c2 c2+c3 -c3 0 0;

0 -c3 c3+c4 -c4 0;

0 0 -c4 c4+c5 -c5;

0 0 0 -c5 c5];

% stiffness matrix

K = [k2 -k2 0 0 0;

-k2 k2+k3 -k3 0 0;

0 -k3 k3+k4 -k4 0;

0 0 -k4 k4+k5 -k5;

0 0 0 -k5 k5];

% Calculate frequency equation

Zw = w^2*M + 1i*w*C + K; % impedance matrix

freqEq = det(Zw); % take determinant to get frequency equation

pretty(simplify(freqEq)); % display simplified frequency equation

% Display the non-zero natural frequencies

disp('Non-zero natural frequencies (Hz):');

disp(root(freqEq))

11 Comments

Show 9 older commentsHide 9 older comments

John D'Errico on 18 May 2024

Direct link to this comment

https://webchat.mathworks.com/matlabcentral/answers/2120241-question-for-using-root-function#comment_3164996

  • Link

    Direct link to this comment

    https://webchat.mathworks.com/matlabcentral/answers/2120241-question-for-using-root-function#comment_3164996

Edited: John D'Errico on 18 May 2024

Please stop posting the same question multiple times. If you want to expand on a question, then do so by editing the question, or by adding a comment. I closed the last question as a duplicate. In fact, since this is now at least the third time you asked this question...

Trong Nhan Tran on 18 May 2024

Direct link to this comment

https://webchat.mathworks.com/matlabcentral/answers/2120241-question-for-using-root-function#comment_3165006

Sry i closed the last one. I had figured out how to do it, so this is my new question to use root to find natural frequency

Torsten on 18 May 2024

Direct link to this comment

https://webchat.mathworks.com/matlabcentral/answers/2120241-question-for-using-root-function#comment_3165011

  • Link

    Direct link to this comment

    https://webchat.mathworks.com/matlabcentral/answers/2120241-question-for-using-root-function#comment_3165011

Open in MATLAB Online

disp(vpa(root(freqEq)))

instead of

disp(root(freqEq))

Trong Nhan Tran on 19 May 2024

Direct link to this comment

https://webchat.mathworks.com/matlabcentral/answers/2120241-question-for-using-root-function#comment_3165386

  • Link

    Direct link to this comment

    https://webchat.mathworks.com/matlabcentral/answers/2120241-question-for-using-root-function#comment_3165386

Error using indexing (line 918)

Invalid MATLAB indexing or symbolic function definition. Symbolic function arguments must be symbolic variables

and function body must be convertible to sym expression.

Error in PartA_b (line 37)

disp(vpa(root(freqEq)))

Related documentation

I got this error when i used disp(root(freqEq))

Torsten on 19 May 2024

Direct link to this comment

https://webchat.mathworks.com/matlabcentral/answers/2120241-question-for-using-root-function#comment_3165426

  • Link

    Direct link to this comment

    https://webchat.mathworks.com/matlabcentral/answers/2120241-question-for-using-root-function#comment_3165426

Edited: Torsten on 19 May 2024

Open in MATLAB Online

If you use the code from above, you won't get this error (at least if you work with MATLAB R2024a).

syms w

% Given parameters

m1 = 1.8; m2 = 6.3; m3 = 5.4; m4 = 22.5; m5 = 54;

c2 = 10; c3 = 0.5; c4 = 1.50; c5 = 1.1;

k2 = 100000; k3 = 50; k4 = 75; k5 = 10;

% Set up system matrices

% mass matrix

M = diag([m1, m2, m3, m4, m5]);

% damping matrix

C = [c2 -c2 0 0 0;

-c2 c2+c3 -c3 0 0;

0 -c3 c3+c4 -c4 0;

0 0 -c4 c4+c5 -c5;

0 0 0 -c5 c5];

% stiffness matrix

K = [k2 -k2 0 0 0;

-k2 k2+k3 -k3 0 0;

0 -k3 k3+k4 -k4 0;

0 0 -k4 k4+k5 -k5;

% Calculate frequency equation

Zw = w^2*M + 1i*w*C + K; % impedance matrix

freqEq = det(Zw); % take determinant to get frequency equation

pretty(simplify(freqEq)); % display simplified frequency equation

10 9 8 7 63720087 w w 2875076127i 13291777051299 w w 1518467207049i 353165987709 w 5 4 3 2----------- + -------------- + ----------------- + ----------------- + --------------- + w 34610882040i + 829211728500 w + w 47283750000i + 337500000000 w 50 5000 2500 500 2

% Display the non-zero natural frequencies

disp('Non-zero natural frequencies (Hz):');

Non-zero natural frequencies (Hz):

%disp(root(freqEq))

disp(vpa(root(freqEq)))

Question for using root function. (7)

Trong Nhan Tran on 19 May 2024

Direct link to this comment

https://webchat.mathworks.com/matlabcentral/answers/2120241-question-for-using-root-function#comment_3165431

  • Link

    Direct link to this comment

    https://webchat.mathworks.com/matlabcentral/answers/2120241-question-for-using-root-function#comment_3165431

Edited: Trong Nhan Tran on 20 May 2024

I dont know what is the wrong here about my code or somthing cuz looking like the answer is 100% worng, the number is too small and a lot of frquencies instead of 5 degree of freedoms. I no idea what wrong with this.

Torsten on 19 May 2024

Direct link to this comment

https://webchat.mathworks.com/matlabcentral/answers/2120241-question-for-using-root-function#comment_3165461

  • Link

    Direct link to this comment

    https://webchat.mathworks.com/matlabcentral/answers/2120241-question-for-using-root-function#comment_3165461

Edited: Torsten on 19 May 2024

Open in MATLAB Online

I don't have experience with the physical background of your equations.

Just solving your system for omega gives a similar result as yours - only the 1i's are missing.

syms w

% Given parameters

m1 = 1.8; m2 = 6.3; m3 = 5.4; m4 = 22.5; m5 = 54;

c2 = 10; c3 = 0.5; c4 = 1.50; c5 = 1.1;

k2 = 100000; k3 = 50; k4 = 75; k5 = 10;

M1 = [-k2, k2, 0, 0, 0;k2, -k3-c3-k2, k3+c3, 0, 0;0, k3, -k4-c4-k3, k4+c4, 0;0, 0, k4, -k5-c5-k4, k5+c5;0, 0, 0, k5, -k5];

M2 = [-c2, c2, 0, 0, 0;c2, -c2, 0, 0, 0;0, c3, -c3, 0, 0;0, 0, c4, -c4, 0;0, 0, 0, c5, -c5];

M3 = diag([m1,m2,m3,m4,m5]);

M = M1+w*M2+w^2*M3;

ans=

Question for using root function. (10)

vpa(root(det(M)==0))

ans=

Question for using root function. (11)

Trong Nhan Tran on 19 May 2024

Direct link to this comment

https://webchat.mathworks.com/matlabcentral/answers/2120241-question-for-using-root-function#comment_3165476

  • Link

    Direct link to this comment

    https://webchat.mathworks.com/matlabcentral/answers/2120241-question-for-using-root-function#comment_3165476

is it m1 is for matrix of stifness and m2 is damping?

Torsten on 19 May 2024

Direct link to this comment

https://webchat.mathworks.com/matlabcentral/answers/2120241-question-for-using-root-function#comment_3165506

  • Link

    Direct link to this comment

    https://webchat.mathworks.com/matlabcentral/answers/2120241-question-for-using-root-function#comment_3165506

Open in MATLAB Online

I just wrote your system of equations in matrix form

M(w)*[X1;X2;X3;X4;X5] = 0

and determined the values of w for which the equation has a nontrivial solution.

Trong Nhan Tran on 19 May 2024

Direct link to this comment

https://webchat.mathworks.com/matlabcentral/answers/2120241-question-for-using-root-function#comment_3165511

  • Link

    Direct link to this comment

    https://webchat.mathworks.com/matlabcentral/answers/2120241-question-for-using-root-function#comment_3165511

but i think M1 was wrong cuz it has c in stiffness matrix

K = [k2 -k2 0 0 0;

-k2 k2+k3 -k3 0 0;

0 -k3 k3+k4 -k4 0;

0 0 -k4 k4+k5 -k5;

0 0 0 -k5 k5];

Torsten on 19 May 2024

Direct link to this comment

https://webchat.mathworks.com/matlabcentral/answers/2120241-question-for-using-root-function#comment_3165616

  • Link

    Direct link to this comment

    https://webchat.mathworks.com/matlabcentral/answers/2120241-question-for-using-root-function#comment_3165616

Edited: Torsten on 19 May 2024

Open in MATLAB Online

Write your equations (1)-(5) as

M1*[X1;X2;X3;X4;X5] + w*M2*[X1;X2;X3;X4;X5] + w^2*M3*[X1;X2;X3;X4;X5] = 0

and you will see that my M1, M2 and M3 matrices are correct to reproduce your system.

But as I said: I don't know if this is how "natural frequencies" are defined.

Sign in to comment.

Sign in to answer this question.

Answers (0)

Sign in to answer this question.

See Also

Categories

MATLABProgramming

Find more on Programming in Help Center and File Exchange

Tags

  • matlab

Products

  • MATLAB

Release

R2024a

Community Treasure Hunt

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

Start Hunting!

An Error Occurred

Unable to complete the action because of changes made to the page. Reload the page to see its updated state.


Question for using root function. (16)

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

You can also select a web site from the following list

Americas

  • América Latina (Español)
  • Canada (English)
  • United States (English)

Europe

  • Belgium (English)
  • Denmark (English)
  • Deutschland (Deutsch)
  • España (Español)
  • Finland (English)
  • France (Français)
  • Ireland (English)
  • Italia (Italiano)
  • Luxembourg (English)
  • Netherlands (English)
  • Norway (English)
  • Österreich (Deutsch)
  • Portugal (English)
  • Sweden (English)
  • Switzerland
    • Deutsch
    • English
    • Français
  • United Kingdom(English)

Asia Pacific

  • Australia (English)
  • India (English)
  • New Zealand (English)
  • 中国
  • 日本Japanese (日本語)
  • 한국Korean (한국어)

Contact your local office

Question for  using root function. (2024)

FAQs

What is a root function example? ›

A root function is a power function of the form f(x)=x1n f ( x ) = x 1 n , where n is a positive integer greater than one. For example, f(x)=x12=√x f ( x ) = x 1 2 = x is the square-root function and g(x)=x13=3√x g ( x ) = x 1 3 = x 3 is the cube-root functions.

How to determine the equation of a root function? ›

The formula for the square root function is f(x) = √x. It means the output of each input value is equal to the square root of the input value. For example, f(25) = √25 = 5. Note that all inputs and outputs of a square root function are always non-negative.

What is the root function rule? ›

The square root function is sometimes called a radical function of order 2 or a root function of order 2. The basic form of the rule of a square root function is f(x)=√x. The standard form of the rule of the square root function is f(x)=a√b(x−h)+k where a is not equal to zero and b > 0.

Is +- square root a function? ›

The equation y = plus or minus the square root of x is not a function, but y = the square root of x is. Why? By contrast, is a function. It passes the vertical line test.

What do the roots of a function tell us? ›

In mathematics, a root of a function f is a number x that turns the value of f to 0: is 0, for 2x + 5 it's -2.5 and so on. Because polynomials are also functions, roots are real things. The fundamental theorem of algebra says every polynomial with complex coefficients has at least one (complex) root.

What are three major root functions? ›

What do roots do? They have three major jobs: absorbing water and minerals, anchoring and supporting the plant, and storing food.

How to find the domain of root function? ›

We recall that the square root cannot take a negative number as an argument. Hence, the domain of the given function is found by setting the expression inside the square root to be greater than or equal to zero. In other words, − 𝑥 ≥ 0 . This leads to 𝑥 ≤ 0 , which is ] − ∞ , 0 ] in interval notation.

Can you add two roots together? ›

If the bases are not the same, then the square roots cannot be directly added together. But, sometimes the terms can be simplified, allowing them to be added together. If the base has a whole number as the square root, then the radical can simply be removed, simplifying the term with the whole number square root.

How do roots work in math? ›

The root of a number in math is a number that when multiplied by itself produces the original number. For example, the square root of 49 is 7 because 7×7=49. In this case, because 7 is multiplied by itself twice to produce 49, we call 7 the square root of 49. The cube root of 27 is 3, because 3×3×3=27.

What is the limit of a root function? ›

The limit of the root of a function equals the corresponding root of the limit of the function. One way to find the limit of a function expressed as a quotient is to write the quotient in factored form and simplify.

How to calculate root value? ›

Finding Square Roots by Repeated Subtraction Method

As per the repeated subtraction method, if a number is a perfect square, then we can determine its square root by: Repeatedly subtracting consecutive odd numbers from it. Subtract till the difference is zero. Number of times we subtract is the required square root.

How to simplify a radical? ›

In order to simplify a radical:
  1. Find the largest square number that is a factor of the number under the root.
  2. Rewrite the radical as a product of this square number and another number, then evaluate the root of the square number.
  3. Write the simplified answer.

What is an example of root equation? ›

For example, the roots of the equation x2 + 5x + 6 = 0 are -2 and -3. The roots of an equation ax2 + bx + c = 0 can be found by the quadratic formula x = (-b ± √ (b2 - 4ac)) /2a.

What is root with example? ›

The root of a number in math is a number that when multiplied by itself produces the original number. For example, the square root of 49 is 7 because 7×7=49. In this case, because 7 is multiplied by itself twice to produce 49, we call 7 the square root of 49. The cube root of 27 is 3, because 3×3×3=27.

What is a simple root of a function? ›

Definition 1.1. Given a polynomial function with real or complex coefficients x ↦ f ( x ) , a simple root is a root of x ↦ f ( x ) such that the derivative of x ↦ f ( x ) evaluated at the root is invertible.

What is root and its function? ›

root, in botany, that part of a vascular plant normally underground. Its primary functions are anchorage of the plant, absorption of water and dissolved minerals and conduction of these to the stem, and storage of reserve foods.

Top Articles
Best Egg Salad Recipe | Downshiftology
Easy French Potato Salad Recipe
Haul auf deutsch: Was ist das? Übersetzung, Bedeutung, Erklärung - Bedeutung Online
Creglist Tulsa
Futuretechgirls Contact
North Station To Lowell Schedule
Leon Vs Chisec Figs
Strawwberrymilkkk
Summoner Calamity
Inloggen bij AH Sam - E-Overheid
Parentvue Stma
Sour Animal Strain Leafly
Dimbleby Funeral Home
Ksat Doppler Radar
German American Bank Owenton Ky
Baca's Funeral Chapels & Sunset Crematory Las Cruces Obituaries
Elemental Showtimes Near Sedaliamovies
Emerge Ortho Kronos
Fortnite Fap Hero
A 100% Honest Review of M. Gemi Shoes — The Laurie Loo
Roxplayhouse
Shannon Ray Booty
San Bernardino Pick A Part Inventory
Timon Meaning In Swahili
Are Swagg And Nadia Dating? The Streamers Appear More Than Friends - Eliktopia
Ketchum Who's Gotta Catch Em All Crossword Clue
Marissa.munoz17
Crimson Draughts.
Jasminx Fansly
Xdefiant turn off crossplay ps5 cмотреть на RuClips.ru
Peoplesgamezgiftexchange House Of Fun Coins
Rs3 Bring Leela To The Tomb
Live Gold Spot Price Chart | BullionVault
Mesmerized Nyt Crossword
Paola Iezzi, chi è il compagno. L’uomo in comune con la sorella Chiara e le nozze 'congelate'
Urgent Care Near Flamingo Crossings Village
Donald Vacanti Obituary
Craigslist Houses For Rent In Juneau Alaska
Skip The Games Albany
Open The Excel Workbook Revenue.xls From The Default Directory
Snapcamms
Baywatch 2017 123Movies
Austin Powers Judo Chop Gif
Payback Bato
Gizmo Ripple Tank Answer Key
Kgtv Tv Listings
Noel Berry's Biography: Age, Height, Boyfriend, Family, Net Worth
Myrtle Beach Pelicans Stadium Seating Chart
Project Zomboid Sleeping Event
The most memorable songs from '90s movies
Rust Belt Revival Auctions
Barotrauma Game Wiki
Latest Posts
Article information

Author: Arielle Torp

Last Updated:

Views: 5842

Rating: 4 / 5 (41 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Arielle Torp

Birthday: 1997-09-20

Address: 87313 Erdman Vista, North Dustinborough, WA 37563

Phone: +97216742823598

Job: Central Technology Officer

Hobby: Taekwondo, Macrame, Foreign language learning, Kite flying, Cooking, Skiing, Computer programming

Introduction: My name is Arielle Torp, I am a comfortable, kind, zealous, lovely, jolly, colorful, adventurous person who loves writing and wants to share my knowledge and understanding with you.