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

Discussion Overview

The discussion revolves around solving for the variable beta (b) in a MATLAB code snippet related to a physics problem. Participants explore the challenges faced in using MATLAB for symbolic computation and the specific requirements for isolating beta within the provided equation.

Discussion Character

  • Homework-related
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant shares their MATLAB code and expresses difficulty in solving for beta, indicating a lack of proficiency with MATLAB.
  • Another participant requests clarification on the definition of beta and its role in the provided code, suggesting the need for a more structured approach to the homework problem.
  • A later reply clarifies that beta refers to the variable 'b' in the equation and emphasizes the need to solve the last equation specifically.
  • One participant suggests that MATLAB may not function as a computer algebra system for isolating beta and notes that additional programming is necessary to calculate a value of beta that satisfies the equation.

Areas of Agreement / Disagreement

Participants express differing views on the capabilities of MATLAB for solving the equation. There is no consensus on the best approach to isolate beta, and the discussion remains unresolved regarding the specific programming steps needed.

Contextual Notes

Participants highlight limitations in the current approach, including the need for a clearer definition of variables and the potential inadequacy of MATLAB for symbolic solutions without additional programming.

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
2K
  • · Replies 5 ·
Replies
5
Views
4K
  • · 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