Answered
Starting with all symbols, ending with mixed symbols and number?
syms a b x %Expression y = (a/b)*x; newy0 = subs(y, [a b], [2 3]) newy1 = subs(y, [a b], sym([2 3], 'd')) newy2 = vpa(subs...

2 years ago | 0

| accepted

Answered
An issue with matlabFunction
matlabFunction can produce vectorized code only if all of the following are true: the expression is scalar for scalar inputs t...

2 years ago | 0

Answered
how to define greek letter as syms in matlab?
MATLAB does not permit using greek characters as variable names. \ expressions cannot be used as variable names. However if yo...

2 years ago | 1

Answered
Fitting a nonlinear model in Matlab
num_samples_per_patient = 10000; %... signals = randn(num_signals, num_samples_per_patient); signals (and so X{1}) is goi...

2 years ago | 0

| accepted

Answered
Hello, I'm trying to plot a normalized wave function of a free particle. My problem is normalizing the function. But get nothin. I use the following values, (10,100,10,10)
psi_i = (sin(k*Dx*(i+1)) + sin(k*Dx*(i-1))/(2 + (Dx^2)* (2*m/h_bar^2))); Unless your m is non-scalar, or your Dx is a n...

2 years ago | 0

| accepted

Answered
How to calculate the area of this object in an image?
"area" could potentially refer to a physical quantity rather than just a pixel count. In order to calculate as a physical quant...

2 years ago | 0

Answered
How is the streamline function implemented?
streamlines() is implemented by calling stream2() or stream3() to figure out where the lines go. Then it just draws the lines. ...

2 years ago | 0

| accepted

Answered
for loop inside while loop
count = 0; iters = 0; while count < 100 iters = iters + 1; a = randperm(100,20); for i=1:length(a) i...

2 years ago | 0

| accepted

Answered
what does A/b mean when solving matrix Ax=b
If you have A*x = b then x = A\b is very likely what you need But if for some reason you want to know what meaning A/b would ha...

2 years ago | 0

Answered
Running Matlab in the linux background using nohup
I suspect that in your shell, matlab is an alias rather than an executable file on your path. For example on Mac, you would hav...

2 years ago | 1

| accepted

Answered
How to solve the elements are different between X0 and H in quadprog
The initial value parameter, x_start in this context, must be a vector .

2 years ago | 0

| accepted

Answered
Matlab Solve and simplify functions not working
V1 = -(760*(348475767795489804396578940311480912*3^(1/2) + 168032379110159424438402050627659277))/(3*(38588796620235615516044318...

2 years ago | 0

Answered
Can Matlab Home run on a Persistent Live Ubuntu USB Stick Operating System?
It is certainly possible to install MATLAB onto a removable drive, whether that drive is spinning rust, or SSD, or USB keychain ...

2 years ago | 0

| accepted

Answered
Help with matlab Homework
As I identified in https://www.mathworks.com/matlabcentral/answers/2058504-need-help-with-matlab-homework#answer_1368659 you sh...

2 years ago | 0

Answered
How to open new command window?
https://www.mathworks.com/matlabcentral/fileexchange/48593-save-entire-command-history-updated-fast can be used to save the comm...

2 years ago | 0

Answered
How can evaluate the integral (r*bessilei(1,k*r)) dr, k is a constant?
syms k r solution = int(besseli(1, k*r), r)

2 years ago | 0

Answered
How to add calculated column to existing matrix in for loop
r2 = 40/1000; r3 = 120/1000; r4 = 70/1000; r5 = 60/1000; %t = linspace(0,5,500); t = (0:1:5); % 50 steps N = le...

2 years ago | 0

| accepted

Answered
Why do I receive the error while running the code?
[ode1, ode2, ode3] = dsolve(eq1, eq2, eq3, 'u(x0) == u0', 'u(xn) == vn', 'w(x0) == w0', 'Dw(xn) == 0'); MATLAB is not able to s...

2 years ago | 0

| accepted

Answered
I need help learning how to input a code of subdividing intervals equally
linspace Caution: linspace takes an parameter that is the number of points involved, not the number of intervals involved. The ...

2 years ago | 0

Answered
Is normalization necessary for input and output data in an Artificial Neural Network (ANN)? Does it impact the network's performance?
Is normalization necessary for input and output data in an Artificial Neural Network (ANN) No, it is not necessary. Does it im...

2 years ago | 0

| accepted

Answered
How to use a global variable when using ode45()?
The first parameter to the ode function, often referred to as t, is mostly not an integer (but might turn out to be an integer b...

2 years ago | 1

Answered
Need help with Matlab homework
data = readmatrix("products inventory.xlsx"); You used readmatrix() to read from a .xlsx file. When readmatrix() works, the out...

2 years ago | 1

Answered
Why does abs cause bad matlabfunction evaluation?
You are taking the derivative of abs(), but abs() does not have a continuous derivative. You have the sub-expression abs(((x - ...

2 years ago | 1

Answered
Access property of class object found by "whos"
What you are looking for is VALUE = evalin(caller, s(matches).name + ".LastUpdate") We do not recommend this, however. If you...

2 years ago | 1

| accepted

Answered
Unable to meet integration tolerances without reducing the step size
[t, u] = ode15s(@(t, u) MyODEs(t, u, Nx, dx, f, c, D), tspan, u0,options); ode15s is defined as passing a scalar value as the f...

2 years ago | 0

Answered
Interpolation across only 1 dimension for a multi-dimensional array
Use interp1(). The first input must be a vector; the second input can be an array of any size; permute() it so that you are inte...

2 years ago | 0

| accepted

Answered
Calculation of mortgage interest from the amount of the mortgage, annuity monthly installments and number of years
M = 100000; a = 8791.59; r = 1; syms x eqn = a == M*(x/1200*(1+x/1200)^(r*12))/((x/1200+1)^(r*12)-1) sol = solve(eqn, x); ...

2 years ago | 0

Answered
How to deal with files in which rows have different numbers of columns
You could readcell but I wouldn't recommend it. I would suggest using textscan with appropriate format for what you are expecti...

2 years ago | 0

Answered
Unable to perform assignment because the left and right sides have a different number of elements.
This version of the code does more work than is necessary, but has the minimal change needed to prevent the particular error you...

2 years ago | 0

Answered
Split array into groups of close numbers
No -- because there is no rigourous meaning to what "close" means. For example, in [1 3 5 7], surely 1 is not "close" to 7, but...

2 years ago | 0

Load more