Solving a simple equation

2 次查看(过去 30 天)
%Angle = B
%Thickness = u
%Inner Radius = p
%Developed length = L
%L = L1+L2+a
%Bend Allowance = a
B = 90;
u = .075;
p = .046875;
L1 = 12;
L2 = 3.5;
syms B u p v;
v = solve(v == pi*((180-B)/180)*(p+(u/2e-6)*(6.5e-6+5e-6*log(p/u)))-2e-6*(p+u),v);
%syms v L1 L2 L;
%L = solve(L==L1+L2+v);
disp(v)
%I am trying to ultimatly solve for L, however when I try and solve for v it comes out wit a really long and complicated equation that includes my variables. I put the equation with the right number in my calculator and got a single number using the same notation, so I'm pretty sure the problem is somewhere in my code. It is probalby really obvius, but I am pretty new and don't know what I'm doing wrong. Any help would be great, thank you.

采纳的回答

Paul Hoffrichter
Paul Hoffrichter 2021-4-2
Sorry, no idea if this is right.
clc, clearvars
%Angle = B
%Thickness = u
%Inner Radius = p
%Developed length = L
%L = L1+L2+a
%Bend Allowance = a
B = 90;
u = .075;
p = .046875;
L1 = 12;
L2 = 3.5;
% % % syms B u p v;
syms v
v = solve(v == pi*((180-B)/180)*(p+(u/2e-6)*(6.5e-6+5e-6*log(p/u)))-2e-6*(p+u),v);
%syms v L1 L2 L;
%L = solve(L==L1+L2+v);
disp(v)
val = double(v);
disp(val);
Output:
1432527233130751/4503599627370496
0.318084943524866

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Assumptions 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by