Answered
Index exceeds the number of array elements (1264).
s=zeros(size(x)); % pre-allocate for i = 1:numel(x) % assuming x a vector % remove i=i+1

7 years ago | 0

Answered
HOW TO CREATE THİS MATRİX
Just add the column vector which goes from 0 to 99 (step size 1) with the row vector which also has the same starting point and ...

7 years ago | 0

Answered
How to change the title of graph in a for loop?
for inputcolumn = 1:12 figure plot(y) title(sprintf('Test %d',inputcolumn)) end

7 years ago | 4

| accepted

Answered
'Input argumenents must be 'double' error in bold
Remove syms x Vin=@(x)... % change int to integral

7 years ago | 0

Answered
Cannot find an exact (case-sensitive) match for 'videoreader'
v = VideoReader('test1.avi'); % ^----^

7 years ago | 0

Answered
delete value in matrix with condition
R=arrayfun(@(x)A(x,dist_A(x,:)<0.5),1:size(dist_A,1),'un',0); R{:} Gives: ans = 1 5 ans = 1 4 ...

7 years ago | 0

| accepted

Answered
Problems with matrices operations
B\A

7 years ago | 0

Answered
Matrix Dimensions Must Agree
use strcmp() to compare strings

7 years ago | 0

Answered
syms behaving differently in terminal and script.
x(0)%=1

7 years ago | 0

Answered
Getting error with matrix operation
A\B

7 years ago | 0

| accepted

Answered
how to insert diganole of zeros in to matrix without using loops ?
a(logical(eye(size(a,1))))=0 % where a is your matrix

7 years ago | 0

| accepted

Answered
How to make this plot with 'for'
C=repelem({'b','r','m','g','k','c','b'},4); V=repelem(7:-1:1,4); time1 = linspace(0,1.4994,2500); figure for k=1:numel(V) ...

7 years ago | 0

| accepted

Answered
print matrix in txt file row by row
doc dlmwrite % see precision option

7 years ago | 0

Answered
How do I plot a graph of two different 2D plots with data set: plot 1 (x,z) and plot 2 (y,z) in One 3D plot showing (x,y,z)?
... plot3(x,zeros(size(x)),z) hold on ... plot3(zeros(size(y)),y,z)

7 years ago | 1

| accepted

Answered
How to use the cat function for a sequence of arrays?
When your loading the file inside the loop save it in the third dimension within the loop.

7 years ago | 0

Answered
Extracting a certain value
array(find(array>70,1,'first'))

7 years ago | 0

Answered
Smoothdata- undefined function 'smoothdata' for input arguments of type 'double'
https://in.mathworks.com/help/matlab/ref/smoothdata.html#bvhejau_seealso - released in 2017a

7 years ago | 0

| accepted

Answered
Is there another way to use mat2cell more efficiently when facing large matrices?
Use a ND array instead of cell array: permute(reshape(A1.',size(A1,2),[],size(A1,1)/N),[2 1 3]) % A - your matrix ,N = 8

7 years ago | 0

| accepted

Answered
Error with double integration
Just make the below changes: h=matlabFunction(h); % remove @(b) in h F1=@(b)... F4=@(b)... %Remove (a,b) from C11 in line g1...

7 years ago | 0

Answered
How to change values meeting certain criteria to NaN... in certain columns only
B=A(:,2:2:end); idx=B>100; B(idx)=NaN; A(:,2:2:end)=B

7 years ago | 0

| accepted

Answered
How can I resolve an invalid date argument using plot?
x = 1804:2300; y = 10./(1+(9.*exp(-0.01*x))); yyaxis left plot(x,y, 'b-'); xx = [1804 1927 1960 1974 1987 1999 2011]; yy = ...

7 years ago | 0

| accepted

Answered
How to average a list of data?
mean(reshape(voltage_datas,3,[]))

7 years ago | 0

Answered
How do i Fixed not enough input arguments in this equation?
A=1; B=4; R9=10;m=3; V_t=7; t=0:.01:1; z=A*exp(-(R9/2*m)*t).*cos(2*pi()*V_t*t+B);

7 years ago | 0

| accepted

Answered
How to merge str array with double array?
C=cellstr([string(A),""+B])

7 years ago | 0

Answered
How to count the number of nonzero numbers in a row.
No loops needed: sum(A~=0,2)

7 years ago | 3

Load more