how t o use equation coming out of solve function with an array

4 次查看(过去 30 天)
I'm trying to put a simple array into a function and plot the values that comes out, i think it doesn't work cause the array size of the function that comes out is not equal to the array size of ti , im kinda new to matlab so sry if this is a noob question
syms toFx
syms ti
ti=1:1:20
toFx=solve(ti./toFx==13,toFx)
plot(ti,toFx)

采纳的回答

Walter Roberson
Walter Roberson 2018-8-20
ti=1:1:20
toFx=solve(ti./toFx==13,toFx)
is asking to find one single toFx that satisfies all 20 of the equations simultaneously.
syms toFx
syms ti
ti_vals=1:1:20
toFx=solve(ti./toFx==13,toFx)
plot(ti_vals, subs(toFx, ti, ti_vals))
  3 个评论
hesha tany
hesha tany 2018-8-24
编辑:hesha tany 2018-8-24
later i needed to use the main alternative so i went back here to check and found that u posted yet another solution to my problem , thanks :D

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

标签

产品


版本

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by