Answered
Repeat value/variable in one column based on variable in another column
c = {'CS1' '7' '7' '7' '7' 'CS2' '9' '9' '9' ... 'CS1' '7' '9' '7' '7' '7' '7' '7' 'CS1'}; ix = ~isnan(str2double(c)); ...

5 years ago | 0

| accepted

Answered
Matrix with for cycle
Qbar = cell(N, 1); % preallocate properly for other variables also Qbar{ii} = ... inside loop

5 years ago | 0

| accepted

Answered
How do I get the differential of Hermite polynomial function?
https://www.mathworks.com/matlabcentral/answers/606286-how-do-i-get-the-differential-of-hermite-polynomial-function#comment_1039...

5 years ago | 0

Answered
Matlab array and matrices
<https://www.mathworks.com/company/newsletters/articles/matrix-indexing-in-matlab.html> Start with MATLAB On-ramp course.

5 years ago | 0

Answered
Convert for loop to while loop
Initialise ii with 0 instead of 1. Otherwise you start it as 2 therefore when you reach 5 it gets incremented to 6 exceeding the...

5 years ago | 0

Answered
How to remove the swap vectors from a matrix?
[Original_matrix, c, ~] = unique(sort(matrix, 2), 'rows'); New_matrix = matrix(setdiff(1:size(matrix, 1), c), :)

5 years ago | 0

Answered
How to store functions in matrix or some way to define them by iterations?
x = 0 : .01: 1; u = x.^2 + 6*x - 7;

5 years ago | 1

| accepted

Answered
How to check if a column data is equal to any of a group of values?
clear sum Ind = sum(ismember(A, B), 2) %Or perhaps you need Ind = nnz(ismember(A, B)) %or fprintf('%d occurs %d times/s\n',...

5 years ago | 0

Answered
How to remove rows based on logical values in one column?
T = table2array(readtable('73(4)_interval.xlsx')); T(any(T==0, 2), : ) = []

5 years ago | 0

Answered
How to do sum of array having decimal value?
clear sum h = [ 0.2 0.54 0.75 1.33 ]; sum(h(2 : end))

5 years ago | 1

Answered
3d function domain problem
https://www.mathworks.com/help/matlab/ref/ellipsoid.html

5 years ago | 0

Answered
Accessing Table entries in MATLAB
https://www.mathworks.com/help/matlab/matlab_prog/access-data-in-a-table.html

5 years ago | 0

Answered
Reshape and Modify a cell array
Bessere Version: V = reshape(Ubertragungsmatrix(:, end), [], 3, 2); V1 = squeeze(num2cell(V, [1, 2])); [Pu_tr, Pn_tr] = deal(...

5 years ago | 0

Answered
Reshape and Modify a cell array
Vielleicht? C = num2cell(reshape(Ubertragungsmatrix(:, end), 294/2, []), 1); C1 = num2cell(cellfun(@(x) {reshape(x, [], 3)}, C...

5 years ago | 0

| accepted

Answered
Use subscript and superscript in legend
legend(['$\overline{H}_{subscript}^' ... '{superscript}$'],... 'interpreter','latex')

5 years ago | 0

| accepted

Answered
What Dth stands for?
Dth stands for the row 2 , index it to the matrix and use sum().

5 years ago | 0

Answered
How to select specific string
Wanted = cell_array(contains(cell_array, "197701011"))

5 years ago | 0

Answered
Replacing n random zeros in a matrix with a specific nonzero value
X(randperm(numel(X), 10)) = 1

5 years ago | 0

| accepted

Answered
How to calculate new column values by using present_value and present_value -1?
v(2:end) ./ v(1:end-1) I would suggest you to do MATLAB On-ramp Course.

5 years ago | 0

Answered
Issue fprint outputting an xyz matrix to a file
fid = fopen('test.txt' , 'w'); fprintf(fid, 'Create vertex x %.2f y %.2f z %.2f\n',data.') fclose(fid) Why not simply ...

5 years ago | 0

| accepted

Answered
Why am I getting invalid expression?
h = 34.869 ; c = 13.679 ; J2eV = 0.845 ; lambda = 800:6:854; E = ((h * c) ./ lambda) / J2eV ; compose("Energy in eV: %f", E...

5 years ago | 1

Answered
Why am I getting the error of "Array indices must be positive integers or logical values." in the f(x) line?
Why on Earth do you need a loop? x = -1.612 : 0.01 : -1.322 ; f = 8 * x.^3 - 2 * x.^2 - 15 * x + 11 ; g = -10 * x.^3 + 10 * x...

5 years ago | 0

| accepted

Answered
Double integral with limits
f = @(y, x) exp(2*x).*(cos(y)); % order of integration was wrong g1= @(y) sin(y); q = integral2(f,0,pi,0,g1) % Using Symbo...

5 years ago | 1

Answered
Why is fimplicit not plotting x^2 = 0 ??
fplot()

5 years ago | 0

Answered
How to loop rand number without repition?
doc randperm

5 years ago | 0

Answered
Function will not run or produce answers
Remove first 2 lines. Your function doesn’t need any input arguments. You must call a function not simply clicking the g...

5 years ago | 0

Answered
Index a v dimensional matrix from a matrix with v columns and n rows
p(sub2ind(size(p), ind(:, 1), ind(:, 2)) = Dayum % where RHS should be equal to size(ind)

5 years ago | 0

Load more