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)

 Accepted Answer

madhan ravi
madhan ravi on 16 Feb 2020
Edited: madhan ravi on 16 Feb 2020
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 Comments

Yes, you need to delete or rename
C:\Users\Areej Alfetlawi\Desktop\all matlab programs\matlab11-6-2019\matlab\error.m
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)
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.
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)
Do you want the final result or do you want the results at times 0, 1, 2, and 3?
I want the result at t=0,1,2,........
Then the second one.
THANK YOU

Sign in to comment.

More Answers (0)

Categories

Community Treasure Hunt

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

Start Hunting!