How to fix this error:"Input arguments must be convertible to floating-point numbers."
Show older comments
I want to use the maximum value to solve R, but I don't know how to fix the error.
clc; clear all; close all;
syms R
step = 10^-12;
t = [-1*10^-8 : step : 1*10^-7];
A=12;
%R = 2.66e-3;
L = 0.406e-9;
C = 1.716e-9;
a = R/(2*L);
n = 1/(sqrt(L*C));
d = sqrt(((n)^2)-(a^2));
T = 15*10^-9 ; % + sqrt(L.*C)%;
m = A/T;
tow = R*C;
unitstep_1 = t>=0;
unitstep_2 = (t-T)>=0;
Vct_t = unitstep_1.*( t - (2.*a./n^2) + (exp(-a.*t)./d).*(( (2.*a./n).*sin(d.*t + atan(d./a))) - sin(d.*t) ));
Vct_T = unitstep_2.*( (t-T) - (2.*a./n^2) + (exp(-a.*(t-T))./d).*(( (2.*a./n).*sin(d.*(t-T) + atan(d./a))) - sin(d.*(t-T)) ));
Vc = m.*(Vct_t - Vct_T);
Vmax = max(Vc);
ANS = solve( round(Vmax,2) == 13.10 )
3 Comments
CHUNYI YEH
on 25 Jan 2021
What should this return? Is x greater than y, less than y, equal to y, or can we not determine their ordering?
syms x y
M = max(x, y)
CHUNYI YEH
on 26 Jan 2021
Answers (1)
Gaurav Garg
on 28 Jan 2021
0 votes
Hi Chunyi,
I ran the code as it is, and couldn't reproduce the issue.
1 Comment
CHUNYI YEH
on 30 Jan 2021
Edited: CHUNYI YEH
on 30 Jan 2021
Categories
Find more on Data Type Conversion in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!