Answered
Solve symbolic equation with derivatives
dsolve(...) is the one to be used for odes.

6 years ago | 0

Answered
Replace values in matrix based on array values
x1(ismember(x1,y1)) = 0

6 years ago | 0

Answered
Pattern search and string indexing
A = @(x){[x(2), x(4), x(1)],[x(3),x(5)],[x(2),x(1)]} B = {2465,2514,147,236,58} C = A(B)

6 years ago | 0

Answered
error in solving system of nonlinear equations
sol = solve([eq1, eq2, eq3, eq4],[x,y,z,T]); %proper way to use solve

6 years ago | 0

Answered
What are the commands for...
https://www.mathworks.com/help/symbolic/colspace.html - see bottom of the page for similar functionality functions.

6 years ago | 0

Answered
Plot Multiple Functions in a single call to fplot
Long story short , it's not possible to use fplot(...) in a single call.

6 years ago | 2

Answered
If statement doesn't return base case
result = (inp < 25) + abs((log(100./inp)/log(4))) .* (inp>=25)

6 years ago | 0

Answered
operator '==' not supported for operands of type 'cell'
ismember(myTable.verb(i), 'smashed')

6 years ago | 3

Answered
splitapply with @num2str
vpa(table1pretty{:,2},digits(5))

6 years ago | 1

| accepted

Answered
PID Command in MATLAB
I think you should use *lsim(...)* because there’s a step input to the model.

6 years ago | 0

Answered
convert a data to a function
<https://www.mathworks.com/help/matlab/ref/polyfit.html>

6 years ago | 0

Answered
Format Specifier in textscan
%d

6 years ago | 0

| accepted

Answered
Replace values in each column of a matrix which lie below a threshold
a(a < [0.5 0.3 0.8]) = 0

6 years ago | 0

| accepted

Answered
matrix dimension must agree
a = linspace(5,20); b = linspace(15,40); y = linspace(30,40); P = 1 + (cos(a/5)).*(sin(b/5))-((y.^2)./(a.*(b.^3))...

6 years ago | 0

Answered
running into issues when using Ode 45
<https://www.mathworks.com/help/matlab/math/parameterizing-functions.html> You are almost there ;)

6 years ago | 0

Answered
Creating a variable with if statement
y = num2cell(x); y(x>6) = {'missing'}

6 years ago | 1

| accepted

Answered
Presenting vectors side to side
T = table; T.A = A(:); T.B = B(:)

6 years ago | 0

Answered
Help with Numerical integration (convert symbolic expression to double)
N=10; S=[20 25 18 29 17 28 23 20 21 30]; normA = S - min(S(:)); normA = normA ./ max(normA(:)); A=normA; A(5)=0.1; syms k ...

6 years ago | 0

| accepted

Answered
Values substitution of intervals.
interval1 = (x >= 1400) & (x <= 1500); interval2 = (x >= 1650) & (x <= 1750); interval3 = (x >= 1950) & (x <= 2000); x(inter...

6 years ago | 0

| accepted

Answered
how to get function value?
df(a) = diff(f) df(2)

6 years ago | 0

| accepted

Answered
Sending vector to Piecewise Functions
doc piecewise

6 years ago | 0

Answered
Logic conditions are not equal in if statements
_"if expression, statements, end evaluates an expression, and executes a group of statements when the expression is true. An exp...

6 years ago | 0

| accepted

Answered
How can I exclude an index from generating a random number?
W = zeros(N,N); for ii = 1:N for jj = 1:N if ii ~= jj Hj = randi(N);...

6 years ago | 0

| accepted

Answered
how to create three conditions in the same if statement?
if (C(i,1)<= A) || (N(i,1)> B) || (x>=y)

6 years ago | 1

Answered
How to assign variable to matrix positions
v = sym(A(:,2))

6 years ago | 0

Answered
Rounding error when dividing
sprintf("%.55f",a/b)

6 years ago | 0

Answered
Array indices must be positive integers or logical values.
Left hand side of the equation (n) and in right hand side D(n). And Ofcourse you don’t need a loop here ;)

6 years ago | 0

Answered
how to create incrementing arrays from each row of a matrix?
indices = arrayfun(@(x) Table.B(x):Table.A(x),1:size(B,1),'un',0);

6 years ago | 0

| accepted

Answered
Error while using Size .
clear all clear size % this is what happens when you name a variable same as the function name ;)

6 years ago | 3

Answered
Vector as input for plotting function
x = input('Values of x:') % feed in for example [1,2,3] y = @sinc; plot(x,y(x))

6 years ago | 0

Load more