Answered
array of NaN for title
doc nan

7 years ago | 0

| accepted

Answered
Converting 2D Array to 3D
permute(reshape(A,I/3,[],J),[1,3,2]) % A - matrix, I - no of rows, J - no of columns

7 years ago | 3

| accepted

Answered
How to select specific points/intersections in a matlab plot?
idx=(abs(y)<1e-2); % ^^^^----- tolerance (10^-2) plot(x(idx),zeros(1,nnz(idx)),'sqb')

7 years ago | 0

Answered
Setting element of a variable X to zero with conditional statement, and putting it into new variable Y?
idx = ( x > 0.3 ) & ( x < 0.6 ) ; % index into whichever variables you like and assign the value/values x(idx) % grabs values o...

7 years ago | 0

Answered
How the computation happening : sum(A~=0,2)
>>A~=0 % creates a logical matrix so when you sum along rows, you get three ans = 3×3 logical array 1 1 1 ...

7 years ago | 1

| accepted

Answered
How do I write this code without a for loop?
Since it’s your homework sum along the rows and use min. doc sum doc min

7 years ago | 1

Answered
Index exceeds array bounds error
When the loop iterator becomes n which is 100 , what happens is dnew(i+1) tries to grab 101’st element from the variable dnew wh...

7 years ago | 0

Answered
if-else within for loop
% Vectorized version (efficient than a loop) k=4; a=13; ii=1:10 c=ii*k; b=a+c; e=b/k; e(b>=26 & b<59)=b(b>=26 & b<59)+k ...

7 years ago | 0

| accepted

Answered
Why can't i plot a graph for a against t?
k_n= 7*10^-11; n= 2; dt=1/3600; %1sec interval t=0:dt:2.5; a= 1-exp(-k_n*(t).^n); %degree of hydration t=0:dt:2.5; figure(...

7 years ago | 1

| accepted

Answered
Create cell array from 00.00 to 23.59
DataArray.Format='H:mm'

7 years ago | 0

| accepted

Answered
how to combine multiple files contain one column only into one file only
https://in.mathworks.com/help/matlab/import_export/process-a-sequence-of-files.html - good reference numoffiles = 179; C = cel...

7 years ago | 0

Answered
How to add a field to a matlab struct.
yourstruct.c=...; % doc setfield()

7 years ago | 0

Answered
how can i merge multi columns of a matrix in another matrix with single column?
% 1) str2double(strrep(join(""+yourmatrix),' ','')) % OR % 2) arrayfun(@(x)polyval(yourmatrix(x,:),10),1:size(yourmatrix,1)...

7 years ago | 1

| accepted

Answered
Data must be numeric, datetime, duration or an array convertible to double.
syms x h=4; q=0; delta=26; phi=39; kh = 0; kv=0; s=...; % didn't define s psi = atan (kh / (1-kv)); da1 = delta * (pi ...

7 years ago | 0

| accepted

Answered
Not enough input arguments. Error in ratio_magnitude (line 6) RV1 =1/sqrt(1+((f*s)/p)^2);
p=...; values here s=...; f=...; RV1 = ratio_magnitude(p, s, f) % function call % save function as a separate file named r...

7 years ago | 1

Answered
plotting the magnitude of a complex fraction
./

7 years ago | 0

| accepted

Answered
Output rows of a matrix that meet a certain condition to a text file
dlmwrite('mytextfile.txt',m(m(:,5)>10,:),'delimiter',' ') %where m is your given matrix

7 years ago | 0

| accepted

Answered
3D arrays multiplication
[m,n,p]=size(H); % size of H =>16X16X10 , size of x => 1X16 aa=reshape(a,[m n*p]); Result=reshape(x*aa,n,p); % size of Result ...

7 years ago | 0

Answered
How can i change type of output of anything in SIMULINK?
Just keep the shape of the display block vertical:

7 years ago | 0

| accepted

Answered
save result in cell
% 7;8;30 % ^ ^---- as you say column vector A=cell(1,4); for k=1:4 A{k}=...; end

7 years ago | 1

| accepted

Answered
find and omit element from array
21;44 % ^ vv(ismember(vv,A))=[]

7 years ago | 0

| accepted

Answered
create a new matrix from a vector
R=arrayfun(@(x)reshape(newV,1,[])==u(x),1:numel(u),'un',0);

7 years ago | 1

| accepted

Answered
Check if Subfolder Exist
https://in.mathworks.com/matlabcentral/answers/348543-how-can-i-find-a-sub-folder-in-the-just-in-the-current-directory#answer_27...

7 years ago | 0

Answered
Comparision of two different cell arrays and save in two different matrices?
result1=a(ismember(a,b)).' result2=a(~ismember(a,b)).'

7 years ago | 1

| accepted

Answered
Delete rows in cell that contain part of string
Cell(strcmp(Cell(:,1),'>'),:)=[]

7 years ago | 1

| accepted

Answered
How to insert value in a specific row and column of cell array ?
idx=ismember(A,[100,200,500])

7 years ago | 0

Answered
How to make a function that uses a mathematical function as an input?
f=@(x)sin(x);

7 years ago | 0

| accepted

Answered
how to resolve subscript mismatch error?
LIP = repmat(temp(:),1,2);

7 years ago | 0

| accepted

Load more