Answered
To solve : System of differential equations with multiple derivative in each equation
Sometimes you can use the Symbolic Toolbox and dsolve() Other times use something like ode45() For example you might need a sy...

4 years ago | 0

Answered
execute dos commend and read excel in simulink (reinforcement learning)
You could potentially use a MATLAB Function block that used system() and readmatrix() You might have to use coder.extern() for ...

4 years ago | 0

| accepted

Answered
Unable to perform assignment because the size of the left side is 1-by-1 and the size of the right side is 21-by-21.
The right hand side uses the *entire* matrix p, not just a single element of it.

4 years ago | 0

Answered
Does Matlab support , creating animation over plots generation over multiple iterations?
VideoWriter() https://www.mathworks.com/help/matlab/ref/videowriter.html does not care how long it takes you to compute addition...

4 years ago | 1

| accepted

Answered
Invalid training data. The output size (12) of the last layer does not match the number of classes of the responses (5).
Your numClasses is 12, but your imdsTrain only contains examples of 5 different classes. Your training data needs to include exa...

4 years ago | 0

Answered
Branched signals cannot be fed into a Merge Block
Your out ports have the signal split into 3 and the 3 are fed into merge blocks. For whatever reason, it is not permitted to sp...

4 years ago | 0

| accepted

Answered
How to recovered mdl file
https://www.mathworks.com/help/simulink/ug/saving-a-model.html You can use the "Export Model to Previous Simulink Version" men...

4 years ago | 0

Answered
i am getting error when i try to use powermod function.the error says Undefined function or method 'powermod' for input arguments of type 'double'.
That function needs the Symbolic Toolbox, R2018a or later. It was not present in your R2007b release.

4 years ago | 0

Answered
Index exceeds the number of array elements. Index must not exceed 0.
fun_hbar = @(theta,z)(1+E*cosd(theta))-((Ha/C)*sind(pi*((theta*nx/2*pi)-1)).^2*sind(pi*(z*nz-1)).^2); deltheta=theta(end)-theta...

4 years ago | 0

Answered
The fsolve function fails to give me an answer for seven unknowns. What should I do?
There are mathematical solutions, but double precision cannot reach those solutions. Notice with digits(50) that the 5th output...

4 years ago | 1

Answered
Maximum identifier length '31' does not provide sufficient space to make symbol names unique
@Bogdan Bodnarescu This is not something that I have had to deal with. I get the impression that you are using model reference...

4 years ago | 0

Answered
Cannot convert double value 108041 to a handle
app.Input_voltage_magnitude.Value= abs(Input_voltage); That code assumes that app.Input_voltage_magnitude is a control of s...

4 years ago | 0

Answered
Folder listing with dir on Mac
dir=ls('Data_from_the_directory/'); dir(1:2,:)=[]; That code is wrong on every operating system that MATLAB has ever run on. Y...

4 years ago | 0

| accepted

Answered
How to solve an equation with two variables?
syms m n Q positive assume(m > 0.1 & m < 1) eqn = Q == sqrt(m * n) / (m + 1 - sym(778)/sym(1000) * m * n) nsol = solve(eqn, n...

4 years ago | 0

Answered
Undefined variable in function
syms omega x

4 years ago | 0

Answered
Adding an extra legend entry
plot(nan, nan, 'DisplayName', "mean = " + c4timeavg(1) + "m/s")

4 years ago | 1

| accepted

Answered
How to correct the error - ClassificationSVM in this code
load('Accuracy_Data.mat') data = Train_Feat; Accuracy_Percent= zeros(200,1); for i = 1:500 groups = ismember(Train_Label...

4 years ago | 0

Answered
arrayDatastore Read cut dimension
result(:,:,:,counter)=resultItem;

4 years ago | 0

Answered
How can I call a specific array by changing what X equals?
We firmly recommend that you do not do that. http://www.mathworks.com/matlabcentral/answers/304528-tutorial-why-variables-should...

4 years ago | 0

Answered
How can i check if http interface in MATLAB is working?
https://www.mathworks.com/help/matlab/ref/matlab.net.uri-class.html has been part of MATLAB itself since R2016b.

4 years ago | 0

Answered
Unrecognized function or variable 'dlaccelerate'.
Introduced in R2021a

4 years ago | 0

| accepted

Answered
How to make the x and y axis labels and the title an input argument for a function
title(graphTitle) ; xlabel(xAxisLabel); ylabel(yAxisLabel);

4 years ago | 0

Answered
Can matlab read binary real*8 data written by fortran?
real*8 is the same as double precision. However: * you have to be careful about byte order. It might be stored in "big endian...

4 years ago | 0

Answered
I am facing difficulty in displaying output of multi objective genetic algorithm.
obj = @(x) [-1 1].*strength(x);

4 years ago | 0

Answered
How to import xlsx file into matlab and plot in fourier 2 variables (R2020b)
There are two different cases to consider. In one case, the interval between samples is exactly regular, and you can determine ...

4 years ago | 0

Answered
How to check multiple lines?
ind=strfind(data,'Priting Done'); You do not use the output of ind . As far as your function is concerned, you might as well no...

4 years ago | 1

Answered
Unable to perform assignment because the size of the left side is 1-by-64 and the size of the right side is 64-by-65536.
dist =pdist2(color_table, reshape(im, [h*w, 3])); color_table is a 2D array. and the reshape() gives a 2D array. pdist2() is go...

4 years ago | 0

Answered
Random number between two decimal numbers
intervalmins = [0.124, 0.325]; intervalmaxs = [0.908, 0.846]; output = rand(length(intervalmins), 1) .* (intervalmaxs(:) - i...

4 years ago | 0

| accepted

Answered
How can I fit a curve on two sets of data simultaneously?
Append the data together. joint_x = [x1; x2]; joint_y = [y1; y2]; cftool(joint_x, joint_y)

4 years ago | 1

Answered
How do i extract data from each group separately and plot
filename = 'https://www.mathworks.com/matlabcentral/answers/uploaded_files/965825/advancedstats2.csv'; t = readtable(filename);...

4 years ago | 0

| accepted

Load more