1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Matlab help. invalid target for assignment trying to solve

  1. Oct 17, 2013 #1
    1. The problem statement, all variables and given/known data

    hey there,
    i'm trying to solve for beta which I tought i'd easily be able to figure out using matlab (i'm not the most proficient matlab user) but i cant get it to work..

    2. Relevant equations



    3. The attempt at a solution

    My code is as follows:

    clear all;
    close all;
    clc;

    Code (Text):
    m = 8;
    a = 0.3;
    l = 0.5;
    g = 9.81;
    I2y = 2;
    I2z = 0.2;
    omega = 7;

    syms b

    omega^2=(m*g*l*tan(b))/((sin(b)*(m*l^2+I2y-I2z)+m*a*l)
    I would like to solve for beta within the range of -pi to pi
     
  2. jcsd
  3. Oct 17, 2013 #2

    SteamKing

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper

    You are going to have to be a little more specific for us slow folks.

    What is beta? How does the code snippet you provided figure in the solution of beta?

    Please follow the Homework template so we don't have to play these guessing games.
     
  4. Oct 17, 2013 #3
    sorry, beta is b
    i would like to solve the last equation. I would like to solve for 'b'. It is the only symbolic as the constants for the other letters are defined above
     
  5. Oct 17, 2013 #4

    SteamKing

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper

    I'm not a Matlab expert, but I don't think it's used as a computer algebra system, which is what you require to isolate beta. Now, if you just want to calculate a value of beta which satisfies the equation you have, knwing the values of the other variables, you can use Matlab to do this, but it requires extra programming. You can't just toss an arbitrary expression at Matlab and have it provide a solution.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Matlab help. invalid target for assignment trying to solve
Loading...