Question

Best way to represent given data (opinion)

I have four column vectors representing forces: P(pressure), B(bending), T(tension), I(interaction). Each row of these vectors r...

7 days ago | 0 answers | 0

Question

Using 'subs' in parallel for more than one equation

I have 5 equations in an array: E = [E1;E2;E3;E4;E5]. Each equation is made of symbolic variables x1,y1. I now want to substitut...

1 month ago | 1 answer | 0

Answered

odeFunction: List variables through loop

I found out a way. The reason I kept getting invalid variable '0' error was my equations had variables dependent on t (x1(t), x2...

odeFunction: List variables through loop

I found out a way. The reason I kept getting invalid variable '0' error was my equations had variables dependent on t (x1(t), x2...

2 months ago | 0

Question

odeFunction: List variables through loop

I have some differential equations that I'm solving using the odeFunction. I am following the steps as described in the document...

2 months ago | 3 answers | 0

Question

How to define a variable which won't clear when 'clear' command is used

I have 5 different scripts, running one after the other, each of which uses some of the variable values from the previous one. T...

2 months ago | 1 answer | 0

Question

Using inv(A)*B instead of A\B

I am trying to solve some differential equations numerically. I followed the steps in this documentation ' <https://www.mathw...

3 months ago | 1 answer | 0

Question

Error in sym: Character vectors and strings in the first argument can only specify a variable or number.

So I have this simple code x = sym('x',[5,1]); T1 = sprintfc('x%d(t)', 1:5); T1=T1'; syms(T1{:}); eqn = x(1)^2 + x(2) +...

3 months ago | 1 answer | 0

Question

Repeat an iteration after verifying an if statement

I have a while loop with 'i' going from 1 to 50. Inside the while loop, I have an if condition, which if it is true, should reru...

3 months ago | 0 answers | 0

Question

Transferring a symbolic expression to a odefun

By some code, I have these 6 ODEs in the command window. dEm_dx= 2*x3 - 2*x2 - x4 - y3/2 + 1/4 2*x2 - 2*x3 + 2*x4 + y2/2...

3 months ago | 1 answer | 0

Question

Creating multiple symbolic functions with arguments

I can use x = sym('x',[n,1]); y = sym('y',[n,1]); to create symbolic variables of length 'n'. I would like to crea...

3 months ago | 1 answer | 0

Question

Help solving a system of differential equations

I have the following system of differential equations, and I am not able to understand the best way to go about them. I tried us...

3 months ago | 2 answers | 0