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)

 Réponse acceptée

madhan ravi
madhan ravi le 16 Fév 2020
Modifié(e) : madhan ravi le 16 Fév 2020

0 votes

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 commentaires

Walter Roberson
Walter Roberson le 16 Fév 2020
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 le 16 Fév 2020
Modifié(e) : Walter Roberson le 16 Fév 2020
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.
areej abdulshaheed
areej abdulshaheed le 17 Fév 2020
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 le 17 Fév 2020
Do you want the final result or do you want the results at times 0, 1, 2, and 3?
areej abdulshaheed
areej abdulshaheed le 17 Fév 2020
I want the result at t=0,1,2,........
Walter Roberson
Walter Roberson le 17 Fév 2020
Then the second one.
areej abdulshaheed
areej abdulshaheed le 17 Fév 2020
THANK YOU

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

Community Treasure Hunt

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

Start Hunting!

Translated by