Answered
Convert an 18x1 cell array in a 3x6 cell array
reshape(cell_array,3,[])

6 years ago | 2

| accepted

Answered
Cannot Plot in the Desired interval, What am i doing wrong here?
clear theta theta = 0:360; Ac = 5; k = 2000; m = 0.001; RPM = 1500; x = theta * 0; ix = (theta>110) & (th...

6 years ago | 0

| accepted

Answered
Save images in for loop without overwrite
doc sprintf % please read it more carefully

6 years ago | 0

Answered
[DISCONTINUED] MATLAB Answers Wish-list #5 (and bug reports)
It would be better if there is a feature that warns when the first word of the poster is Write. Because at the end the poster e...

6 years ago | 3

Answered
[DEPRECATED] What frustrates you about MATLAB?
I know this issue has been discussed before. But anyhow, it would be great to differentiate a function when its a symbolic funct...

6 years ago | 1

Answered
Deleting an entire column using an IF statement
data(:,all(isnan(data))) = [] % deletes entire column

6 years ago | 0

| accepted

Answered
Find first and last NaN/Finite element in each row of a large array.
First = find(~isnan(row1), 1, 'first’) Last = find(~isnan(row1), 1, 'last')

6 years ago | 4

Answered
Plot solutions to a multi variable system: x + 2y + 3z = 4
doc fimplicit3

6 years ago | 2

Answered
How to find argument value?
mng = [m(:), n(:), g(:)]; ab_at_g = mng(ismember(mng(:,3),7),1:2)

6 years ago | 0

| accepted

Answered
Plotting points to make a line
<https://www.mathworks.com/learn/tutorials/matlab-onramp.html *First Step to solution*>

6 years ago | 0

Answered
To avoid ambiguity, use a format character vector. e.g. '%{MM/dd/uuuu}D'
readtable(filename,'Format', '%{MM/dd/uuuu}D')

6 years ago | 0

| accepted

Answered
Question about length function
[rows,columns] = size(array)

6 years ago | 1

| accepted

Answered
How can I round numbers from a column?
round(C{:,1})

6 years ago | 0

| accepted

Answered
How can I get the analytical solution for this problem?
It is correct approach. I suggest you to do MATLAB Onramp course and watch Cleve Moler's videos about odes. https://www.mathwor...

6 years ago | 1

Answered
Why anonymous funcion sometimes work with an array and in other occasions it's necessary to use arrayfun()?
.* .^ ./ when the input is an array else MATLAB only takes the first element of the input.

6 years ago | 1

Answered
Making numbers equal to a definite value
array(ismember(array,[95, 48, 30, 51])) = 50 P.S: Didn’t realise it was a homework question. However it requires a loop. Mo...

6 years ago | 1

| accepted

Answered
Copying Data into a table
NewTable = T(T.STAT==0, :)

6 years ago | 1

| accepted

Answered
Number of times the rows of a small matrix appear amongst the rows of a larger matrix, vectorization
[m, n] = size(S); times_each_row_appears = zeros(m,1); %preallocate for speed! for kk = 1:m times_each_row_appears(kk,1) ...

6 years ago | 1

| accepted

Answered
How to replace letters in a table column with a 1
f = @(x)strcmp(T.Column,x); T.Column = f('unidentified') * 0 + f('D') * 1

6 years ago | 0

| accepted

Answered
Help with fprintf displaying results in 2 columns
radx=0:pi/10:2*pi; degx=rad2deg(radx); fprintf('rad \t\t deg\n') fprintf('%f %f\n',[radx;degx])

6 years ago | 1

Answered
disp vs fpintf?
<https://www.mathworks.com/matlabcentral/answers/430470-what-is-the-difference-between-the-disp-function-and-fprintf#answer_3475...

6 years ago | 0

Answered
Array indices must be positive integers or logical values.
clear rad2deg angle

6 years ago | 0

| accepted

Answered
OdeToVectorField usage with initial conditions
syms y(x) a cond1 = y(0) == a Sol = dsolve(diff(y,2)==x,cond1) % symbolic solver since initial condition is symbolic And if y...

6 years ago | 0

Answered
How to delete specific text from multiple cell in a column ?
c = {'21.15 (cd)';... '42.12 (cd)';... '24.45 (cd)'}; func = @(x) sscanf(c{x},'%f'); Wanted = arrayfun(func,1:nume...

6 years ago | 0

| accepted

Answered
How to factorize 13916767508299776?
factor(sym(13916767508299776))

6 years ago | 0

Answered
How to find the position of a number in an array?
k = find( (abs(Y) - 8) < 1e-2 ) % where 1e-2 is the tolerance

6 years ago | 0

Answered
How to remove elements that can be divided into 45 on one condition?
LimiT = 30; divider = 45; ix = find(mod(x,divider)==0,LimiT - 1); Wanted = x(ix * ~isempty(ix))

6 years ago | 0

Answered
Can I use others languages when writing on latex
S = '$$\Gamma \quad \epsilon \quad \iota \quad \acute{\alpha}$$'; xlabel(S, 'interpreter', 'latex', 'FontSize', 45) % remov...

6 years ago | 0

| accepted

Answered
pre allocating vector for loop
c1 = cell(numel(a11),1); % before loop use numel instead of length c1{ii} = ... inside loop

6 years ago | 0

| accepted

Load more