Question to Matlab solve-function

20 views (last 30 days)
Hey guys I have a simple question: I am using Matlab R2010a and trying to solve an equation with 1 variable like this:
solve('4-t^2=0')
ans =
-2
2
No problem as you can see ;) My question is, when I try to replace the 4 with a variable (lets call it A), it wont work how I want it to work:
solve('A-t^2=0')
ans =
A^(1/2)
-A^(1/2)
All fine, solution found but A is not a variable, it has a defined value of 4, so that the solution would be -2,2. Can anyone help me to find the solution to this problem if its possible?
Thanks a lot guys!
  2 Comments
Faithful Friend
Faithful Friend on 6 May 2020
Can you help me to solve these questions ??❤
1) Write the program that prints on the screen that the given system is not hyperstatic, isostatic or geometrically changing olopes.
2) Write the program that finds the support reactions of an L-length beam (isostatic) according to the external force to be entered.
3) L uzunluğundaki bir kirişin herhangi bir noktasındaki moment ve kesme kuvvetini bulan programı yazınız.

Sign in to comment.

Accepted Answer

Azzi Abdelmalek
Azzi Abdelmalek on 5 Feb 2014
syms a t;
sol=solve(a-t^2)

More Answers (4)

randa khaireddin
randa khaireddin on 7 May 2020
Question 4: Consider the matrix A.
? = [
3 5 −4 −8 −1 33 −17 6 −9 ] Using for loop with conditional statements, write a program that generates matrix B by:  computing the natural logarithm of the elements of A whose value is greater than 1,  adding 5 to each element of A that is equal to or less than 1.
A. Write down the MATLAB code for this program. B. [2 pts] Write down the generated matrix B.

ATUL KUMAR
ATUL KUMAR on 14 Nov 2020
𝑥1 (𝑛) = 10𝑢(𝑛) − 5𝑢(𝑛 − 5) − 10𝑢(𝑛 − 10) + 5𝑢(𝑛 − 15).

Faheem anwar
Faheem anwar on 3 Aug 2021
Compute y(0.2) by Euler Method, h = 0 and h = 0.1

Vikas Vishwakarma
Vikas Vishwakarma on 27 Mar 2022
The Graph of the I-V characteristics of an ideal diode solar cell when non-illuminated (dark) and illuminated. Solar cell output parameters From Figure-4, it is shown that there are 4 output parameters, which have to be considered in solar cell. The first parameter is I SC that is short circuit current output of solar cell, which is measured when the output terminal is shorted or V is equal to 0. The value of output
The Graph of the I-V characteristics of an ideal diode solar cell when non-illuminated (dark) and illuminated. Solar cell output parameters From Figure-4, it is shown that there are 4 output parameters, which have to be considered in solar cell. The first parameter is I SC that is short circuit current output of solar cell, which is measured when the output terminal is shorted or V is equal to 0. The value of output
  1 Comment
Vikas Vishwakarma
Vikas Vishwakarma on 27 Mar 2022
The Graph of the I-V characteristics of an ideal diode solar cell when non-illuminated (dark) and illuminated. Solar cell output parameters From Figure-4, it is shown that there are 4 output parameters, which have to be considered in solar cell. The first parameter is I SC that is short circuit current output of solar cell, which is measured when the output terminal is shorted or V is equal to 0. The value of output

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!