hi everyone
I would like to do integration to the acceleration
syms t
c=0.0625;
a=c*t
v=int(a)
t=0:1:10;
v=subs(v)
the problem when I use subs function this error accor
Attempt to execute SCRIPT error as a function:
C:\Users\Areej Alfetlawi\Desktop\all matlab programs\matlab11-6-2019\matlab\error.
Error in sym/subs>mupadsubs (line 151)
error(inputchk(X,Y));
Error in sym/subs (line 142)
G = mupadsubs(F,X,Y);
Error in int (line 8)
v=subs(v)

 採用された回答

madhan ravi
madhan ravi 2020 年 2 月 16 日
編集済み: madhan ravi 2020 年 2 月 16 日

0 投票

Run:
which subs -all
which error -all
In command window and paste the output here. It looks like you have a script named error.m that you may have created.

8 件のコメント

Walter Roberson
Walter Roberson 2020 年 2 月 16 日
Yes, you need to delete or rename
C:\Users\Areej Alfetlawi\Desktop\all matlab programs\matlab11-6-2019\matlab\error.m
areej abdulshaheed
areej abdulshaheed 2020 年 2 月 16 日
編集済み: Walter Roberson 2020 年 2 月 16 日
thank you brother
another question plz
if I have the acceleration
a=0.0625; T=32
  1. s=a at 0<=t<T/10
  2. s= 0 at T/10<=t <9T/10
  3. s=-a at 9T/10<=t<T
how can I fine the velocity (v) and the distance (d)
Walter Roberson
Walter Roberson 2020 年 2 月 16 日
s = piecewise(0 <= t & t <= T/10, a, ...
T/10 <= t & t < 9*T/10, 0, ...
9/10*T <= t & t < T, -a, ...
nan) %t < 0 or t >= T
However, there is no obvious connection between s and v or d.
areej abdulshaheed
areej abdulshaheed 2020 年 2 月 17 日
v& d is the itegration of acceleration. but I dont know which type I use for itegration
v=int(s,t,0,T/10)
or
v=int(s,t)
t=0:T/10
V=subs(v)
Walter Roberson
Walter Roberson 2020 年 2 月 17 日
Do you want the final result or do you want the results at times 0, 1, 2, and 3?
areej abdulshaheed
areej abdulshaheed 2020 年 2 月 17 日
I want the result at t=0,1,2,........
Walter Roberson
Walter Roberson 2020 年 2 月 17 日
Then the second one.
areej abdulshaheed
areej abdulshaheed 2020 年 2 月 17 日
THANK YOU

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Programming についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by