Answered
nonconformant arguments, Array substitution
You cannot. Breadth is a column vector of length x. [1;4;2;4;2;4;2;4;1] is a column vector of length 9. You cannot multiply thos...

4 jours ago | 0

Answered
Convert Txt file to an array
data = readmatrix('C:\Users\Acer\Desktop\project hydro\Offset.txt');

5 jours ago | 0

Answered
datasets related 2 questions
No, dataset() does not support storing string() objects. dataset() automatically converts string() objects to a cell array of ch...

5 jours ago | 0

Answered
Ylim for bar subplot
subplot(3,1,3); By default ylim() applies to the current axes. You just called subplot() so the current axes is the third o...

5 jours ago | 0

Answered
Error - I am new to Matlab and I just need help to graph this data I am getting a strange error.
for k = [2;20;200] An obscure fact is that "for" iterates along *columns* of the expression. Your right hand side is a colu...

5 jours ago | 0

Answered
Matlab script generating corrupted workspace
I wonder if you are accidentally saving code to the mat file? In any case: do not save() a mat file directly to OneDrive espe...

5 jours ago | 0

Answered
Using parfeval to call eval function not working - why?
Transparency violation. parfor and parfeval need to know the names of the functions at analysis time so that it can copy the cod...

5 jours ago | 0

| accepted

Answered
Use two different color schemes in contour plot
You will need to use two different axes, as only one colormap can be active per axes. The two axes can be in the same position. ...

5 jours ago | 0

Answered
How to clean up the repeating element in an array?
x = [0 0 0 0 2 2 4] v = unique(x)

5 jours ago | 0

| accepted

Answered
How to sub sym to a number in a matrix
subs(val, q(1:2), [VALUE1; VALUE2])

6 jours ago | 0

| accepted

Answered
Is there any other function faster than sum(A,2) to get the sum of all rows?
Switching to columns can improve performance as it allows better use of hardware cache.

6 jours ago | 1

Answered
unable to use solve or fsolve for linear system
those cross() calls each return a vector, and you compare the vector to [0 0 0] giving a vector result. You then try to store th...

6 jours ago | 0

Answered
Can we choose step size rule in fmincon?
https://www.mathworks.com/help/optim/ug/optimizing-a-simulation-or-ordinary-differential-equation.html#btfixqo shows some contro...

7 jours ago | 0

Answered
How to copy a matrix but skipping some row and column?
M = rand(24, 24); toskip = [1, 2, 4, 6, 8, 17, 19]; %version 1 M1 = M; M1(toskip, :) = []; M1(:, toskip) = []; size(M1) ...

7 jours ago | 0

Answered
Matrix is close to singular or badly scaled. Results may be inaccurate.
You have enough duplicate t values that when you calculate "a" the rank does not reach 7; rank of a2*a does not reach 7, so your...

8 jours ago | 0

| accepted

Answered
How to use use an anonymous function to fit data based on the fittype and fit functions.
There is no chance of fitting that function. fit() and fittype() pass in numeric data, and diff() of numeric data is always sma...

8 jours ago | 0

Answered
Speeding up fread for random position in big file
In my experience, you can be more efficient on conversion of 12 bit data than what is done by fread() If memory serves raw = u...

8 jours ago | 0

| accepted

Answered
How can I get this code to work? I am trying to fit the equation that contains step and delta function to experimental data. But I am getting the following error.
Your Energy are in the 500 range. exp(pi*energy) overflows double precision. Your code then divides by large values, but you hav...

8 jours ago | 1

Answered
Is it possible to decide which line is variable names in readtable?
Yes, you can do that. For example, variable_row = 3; datatable = readtable(filename, 'VariableNamesRange', variable_row); In ...

8 jours ago | 0

| accepted

Answered
Double condition to find index
freq = 2000; %hz threshold = 20; %newtons significant_time = 50; %milliseconds significant_samples = ceil(significant_tim...

8 jours ago | 1

| accepted

Answered
How to run a .exe file in other computers without Matlab?
https://www.mathworks.com/products/compiler/matlab-runtime.html has links to download mcr 8.5 (R2015a) In https://www.mathworks...

8 jours ago | 0

Answered
Solve IVP with Taylor method of order
https://www.mathworks.com/matlabcentral/answers/1746100-whole-derivation-of-two-variable-differential-function#comment_2229660 a...

9 jours ago | 0

| accepted

Answered
Error in the for loop of my function
The second parameter to symsum must be a scalar symbolic variable that will be summed over. However in your code, the second par...

9 jours ago | 0

Answered
How do you create a scatter plot using select columns from app.UITable.Data?
scatter(TableName{:,2}, TableName{:,4})

9 jours ago | 0

Answered
Is it possible to get the path of a file using uigetfile() ?
[filename, filepath] = uigetfile(); if ~ischar(filename); return; end %user cancel fullname = fullfile(filepath, filename); ...

9 jours ago | 1

| accepted

Answered
eeg data to move a motor
Create a numeric array in which each row is a different (fixed-length) eeg sample, and in which you have another variable which ...

9 jours ago | 0

| accepted

Answered
Extracting Categories from array
As the Tips says, C includes all categories in A, even if A does not contain any data from a category. To see the unique values...

9 jours ago | 1

Answered
How can I determine the cluster of pixels in an image that are red or green and quantify how many of the clusters are green or red?
filename = 'https://www.mathworks.com/matlabcentral/answers/uploaded_files/1036195/image.jpeg'; YourRGBImage = imread(filename)...

9 jours ago | 0

| accepted

Answered
Why there is an error in line 132? ( [Fit(1,j), tetaDE]=selectmodel2(Pop(:,j),NP,D,mphi,start,nodata,y,u);)
The following fails because you did not provide initbp() ui = [ -3.7287749e-001 1.5462074e-001 3.6396491e-001 -2.254015...

9 jours ago | 0

| accepted

Answered
pair-was operation on 3D image(3D matrix)
You need to give up on the algorithm. If you were able to represent the results with one byte each, you would need 3435973836800...

9 jours ago | 0

Load more