MATLAB Answers

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

3 views (last 30 days)
venkatesu u
venkatesu u on 15 Sep 2021
Answered: Walter Roberson on 15 Sep 2021
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
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()

Sign in to comment.

Answers (1)

Walter Roberson
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')

Tags

Community Treasure Hunt

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

Start Hunting!