フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

why the value of 'k' is coming negative if all input values are positive

2 ビュー (過去 30 日間)
Prateek jain
Prateek jain 2018 年 4 月 3 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
clc;
clear all;
close all;
syms x eta xi
x=0.577
y=[x x;x -x;-x x;-x -x]
jac=[0.25*(11+eta) 0.25*(1+xi);0.25*(-3-3*eta) 0.25*(9-3*xi)];
jacdet(xi,eta)=det(jac)
w1=1
w2=1
f(1)=0
for i=1:4
xi=y(i,1)
eta=y(i,2)
m=eval(jacdet)
psi1=0.25*(1-xi)*(1-eta)
k=m*w1*w2*psi(1)
f(1)=f(1)+k
%f1=vpa(f1)
end
  2 件のコメント
James Tursa
James Tursa 2018 年 4 月 3 日
If all what input values are positive? I see negative numbers in several places in your code.
David Goodmanson
David Goodmanson 2018 年 4 月 3 日
Hi Prateek,
w1,w2 >0; m (for your particular value of x) >0; psi(1) = -.5772

回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by