Matlab help. invalid target for assignment trying to solve

  • Thread starter Thread starter tigertan
  • Start date Start date
  • Tags Tags
    Assignment Matlab
Click For Summary
SUMMARY

The discussion centers on solving for the variable beta in MATLAB using symbolic computation. The user attempts to use the equation omega^2=(m*g*l*tan(b))/((sin(b)*(m*l^2+I2y-I2z)+m*a*l) but encounters an "invalid target for assignment" error. It is established that MATLAB is not primarily a computer algebra system, which complicates isolating beta directly. Instead, users are advised to calculate a specific value of beta by implementing additional programming techniques.

PREREQUISITES
  • Basic understanding of MATLAB syntax and functions
  • Familiarity with symbolic mathematics in MATLAB
  • Knowledge of trigonometric functions and their application in equations
  • Understanding of the physical parameters involved (mass, gravity, length, etc.)
NEXT STEPS
  • Learn MATLAB symbolic toolbox functions for solving equations
  • Explore MATLAB's numerical methods for finding roots of equations
  • Study the use of 'fsolve' for solving nonlinear equations in MATLAB
  • Investigate MATLAB's plotting capabilities to visualize solutions
USEFUL FOR

Students and professionals in engineering or physics who are using MATLAB for computational problems, particularly those dealing with symbolic mathematics and equation solving.

tigertan
Messages
24
Reaction score
0

Homework Statement



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 can't get it to work..

Homework Equations





The Attempt at a Solution



My code is as follows:

clear all;
close all;
clc;

Code:
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
 
Physics news on Phys.org
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.
 
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
 
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.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
2
Views
1K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K