I want to plot a integral expression but it shows error as "Incorrect dimensions for raising a matrix to a power. Check that the matrix is square" Kindly help me out
1 view (last 30 days)
Show older comments
clear all
clc
syms t hw
sigma=8.41/1000000;
A=4*10^(-14);
C=1.2404e+08;
hw=[2:0.02:9];
t=int((1/((C/sigma)*((sigma*hw)^3+(A)))),hw,0,hw);
plot(hw,t,'bo')
3 Comments
Konrad
on 15 Sep 2021
Same issue. Use
1./((C./sigma).*...)
I'm not very familiar with the symbolic math toolbox, but are you sure you got that right? Maybe you don't need the syms but want numerical integration? Then take a look at integral()
Answers (1)
Walter Roberson
on 15 Sep 2021
syms hw
sigma = 8.41/1000000;
A = 4*10^(-14);
C = 1.2404e+08;
t = int((1/((C/sigma)*((sigma*hw)^3+(A)))),hw,0,hw);
HW = [2:0.02:9];
T = double(subs(t, HW));
plot(HW, T, 'bo')
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!