フィルターのクリア

How to fix this error:"Input arguments must be convertible to floating-point numbers."

4 ビュー (過去 30 日間)
CHUNYI YEH
CHUNYI YEH 2021 年 1 月 25 日
編集済み: CHUNYI YEH 2021 年 1 月 30 日
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 件のコメント
Steven Lord
Steven Lord 2021 年 1 月 25 日
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)
Error using symengine
Input arguments must be convertible to floating-point numbers.

Error in sym/privBinaryOp (line 1034)
Csym = mupadmex(op,args{1}.s, args{2}.s, varargin{:});

Error in sym/max (line 108)
C = privBinaryOp(X, Y, 'symobj::zipWithImplicitExpansion', 'symobj::maxComplex', nanflag);
CHUNYI YEH
CHUNYI YEH 2021 年 1 月 26 日
Oh, I think it’s not determine. But how to avoid this problem if I need the maximum value? Use for loop to change R and find the maximum value which is equal to my setting?But I think it’s not the best solution...😂 Thank you

サインインしてコメントする。

回答 (1 件)

Gaurav Garg
Gaurav Garg 2021 年 1 月 28 日
Hi Chunyi,
I ran the code as it is, and couldn't reproduce the issue.
  1 件のコメント
CHUNYI YEH
CHUNYI YEH 2021 年 1 月 30 日
編集済み: CHUNYI YEH 2021 年 1 月 30 日
Hello, Gautama, thanks for the information. Maybe I will ran again in my lab’s computer, but I don’t think it’s the version problem.🤔

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSwitches and Breakers についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by