Answered
Array indices must be positive integers or logical values..........??
for i=1:neq b(i)=input('\nEnter the constant values b: ') You store into b(1), b(2) and so on all the way up to b(neq)...

3 years ago | 0

Answered
Finite Differencing Transient Conduction
T0 = zeros(t+1,51); T1 = zeros(t+1,51); Okay, both zeros for i = 1:t T0(i,1) = 673; You replace a particular element of...

3 years ago | 1

Answered
How to add zeros diagonally in a matrix?
Your A is 23 x 22. You add 1 row and 0 columns to that to get B of size 24 x 22. A= [0 0 0 1 0 -1 0 ...

3 years ago | 0

| accepted

Answered
Using ode45 and fzero to solve non-linear second order ODE with 1 unknown.
Global variables T1 and V1 were never initialized, so they will be empty when the code is executed. That will cause problems in ...

3 years ago | 0

Answered
How to solve "system contains a nonlinear equation"
syms y(x) x Y mum=2; r=0.05; m=0.01; p=1; s=1; t=0.1; a=0.25; b=0.25; l=0.5; t0= ((1/(r+p*s-m))^(1/(1-a-b)))+((1/(r+p...

3 years ago | 0

Answered
Allow fastawrite() to pass in a string array or speed it up as is for many sequences?
parfor or parfeval (maybe background pool) could potentially be faster, but not necessarily * if each fastawrite involves com...

3 years ago | 0

| accepted

Answered
How can I get an output to Matlab command from generated code (Matlab system object)
If want to emit debugging messages in a deployed executable, you have three choices: * you can make them into signals that ar...

3 years ago | 0

Answered
link the .mat file on the matlab table
You could use a CreateFcn callback.

3 years ago | 0

Answered
I have a Mac M1 machine with licensed 2023a and demo 2022b/Apple silicon, can I install adding on the Demo/Apple Silicon Matlab?
If I recall correctly, Add-on Manager was not available for that beta version. Have you tried the newer beta?

3 years ago | 0

| accepted

Answered
"You might not have write permission." error in MATLAB cloud
MATLAB Cloud runs on Linux systems. On Linux systems, depending on exact context, \ in a file name might just be another charact...

3 years ago | 0

| accepted

Answered
Clear persistent variables of function on worker
parfevalOnAll(@() clear('persistentFunction'), 0)

3 years ago | 0

| accepted

Answered
Functions Not Supported for Compilation by MATLAB Compiler. What is the solution?
You would need to use isdeployed() to prevent those functions from being called in the compiled version of your application. ...

3 years ago | 1

| accepted

Answered
Why do I get an invalid text character error?
for i=1:3 i will contain numeric values. VX = eval(['V',i]); When you use the [] operator between a character vector ...

3 years ago | 2

Answered
Develop standalone stateflow to run independently on Raspberry Pi
But the thing I want to do is to make it run even after I power cycle Raspberry P Anyone have a simple and easy solution to mak...

3 years ago | 0

Answered
why am i getting complex values with IFFT?
indices1 = f(length(time)/2:end) > 94 %(high)range of frequencies aloud in reconstruction indices2 = f(1:(length(time)/2...

3 years ago | 0

| accepted

Answered
Using matlabFunction with symbollic expression containing a matrix
y is 3 x 1. A is 3 x 4. [y, A] is valid and is 3 x 5. x is 4 x 1. [3 x 5, 4 x 1] is a mismatch of dimensions. The [y, A, x] ha...

3 years ago | 0

Answered
Which vesrion should I buy academic or student?
It sounds as if you would be using toolboxes that are available on either license. Officially speaking, you would own a Student...

3 years ago | 1

Answered
how can we sketch the graph of this iteration xn+1=xn-8*f'(xn) in matlab code?
consider f(x)=x^2; x(n+1) = x(n) -8*f'(x(n)) But when f(x) = x^2 then f'(x) = 2*x so x(n+1) = x(n) - 8*2*x(n) = -15*x...

3 years ago | 0

Answered
What does [n==0] means?
n==0 normally compares every element of n to the value 0 and returns a logical array the same size as n indicating whether ...

3 years ago | 0

Answered
Why does my code get stuck when trying to convert a double integral into a double?
if you are after the numeric solution then switch to vpaintegral()

3 years ago | 0

| accepted

Answered
Error using / Arguments must be numeric, char, or logical.
The ability to do calculations directly on tables is not available until r2023a. Your refV is a table so refV(91,1) is a 1x1 tab...

3 years ago | 0

Answered
Simplify the exponential equation
No. That is the most compact version that you can reasonably expect. You can break it into pieces, but then what? y = str2sym...

3 years ago | 0

Answered
Can I use sync my mobile camera with matlab for object detection?
For Android or iOS cameras see https://www.mathworks.com/help/matlab/ref/mobilesensor.internal.camera.html

3 years ago | 0

| accepted

Answered
could you help me in this code
You cannot add an 8 x 1 vector and a 9 x 1 vector. % Define grid parameters h = 1/4; % Grid spacing x = -1:h:1; % ...

3 years ago | 0

Answered
I keep getting this error on my code, I would really appreciate any help.
diag(S(1:11), -1) When you diag(VECTOR, INDEX) then diag() wants to put all of the contents of VECTOR onto the diagonal indicat...

3 years ago | 0

Answered
Display matrix results with message
num_rows = size(YourMatrix, 1); for row_index = 1 : num_rows if YourMatrix(row_index, 2) > threshold fprintf('Al...

3 years ago | 0

| accepted

Answered
Plotting a horizontal line on a scatter graph in MATLAB
yline(20, '--')

3 years ago | 0

Answered
Creating a tool that adds to the functionality of an existing toolbox
The only kind of license that you can use to earn money with is the commercial license. That includes side issues such as the po...

3 years ago | 0

| accepted

Answered
Using ismember with some margin
ismembertol by default uses relative tolerances. To use absolute tolerance with it you need to set the relative portion to 1 and...

3 years ago | 0

Answered
Distribution resulting from weighting different factors
if mode A is 80% of 1500 then mode B is 20% of 1500, *not* 20% of 1000

3 years ago | 0

Load more