Answered
how to release indexes in an array
unique(arr)

7 years ago | 0

Answered
calculate average column in multiple files
https://www.mathworks.com/help/matlab/import_export/process-a-sequence-of-files.html

7 years ago | 0

| accepted

Answered
Plot vectors of unqual length
Read about linspace() A=1:150; % fake data for example B=1:10; B=linspace(min(B),max(B),numel(A)); plot(A,B)

7 years ago | 0

Answered
how to convert to a cell array from a single precision array
a=single([ 1.1 1.2 2.1 2.2 3.1 3.2]); b=cell(size(a,1),1); for i = 1:size(a,1) b{i}=a(i,:); end b={b}; b{...

7 years ago | 0

Answered
I am trying to solve for a variable from two differential equations with initial conditions. It keeps saying it cannot find a solution.
Note: Since dsolve() is not able to solve convert it to numerical method to use numerical solvers. The initial condition was cha...

7 years ago | 0

Answered
How do I write a script to change figure and plot colors?
https://www.mathworks.com/matlabcentral/answers/96816-how-do-i-change-the-default-background-color-of-all-figure-objects-created...

7 years ago | 0

Answered
how can i round up all my numbers in this matrix (to make it look like the bottom line)
https://www.mathworks.com/help/matlab/ref/ceil.html - ceil() does the job. a=[ 19.921920682316983 15.607883029893719 12.36994...

7 years ago | 0

| accepted

Answered
How do I get an array to display the list of float values?
https://www.mathworks.com/help/matlab/ref/format.html#btixwz8-1_1

7 years ago | 0

| accepted

Answered
How to add percentage in a bar plot?
https://www.mathworks.com/matlabcentral/answers/359237-how-do-i-label-each-bar-in-bar-group-with-a-string-on-top#answer_283896 ...

7 years ago | 1

| accepted

Answered
how to flip a general square matrix ( it could have even or odd number of rows/cols ) from it's center in matlab ?
Perhaps? a(:,end:-1:1) % columns a(end:-1:1,:) % rows

7 years ago | 0

Answered
Why do I have to type '^' plus the next character two times?
It's wierd better contact the mathworks support team by clicking the Contact Us button on the top right corner of this page.

7 years ago | 0

Answered
i need help balancing the inner matrix dimensions of the two sine functions .
mul_sines(50,45) % function call % f1 ---^^ ^^----- f2 function mul_sines(f1,f2) % function definition t=0:0.01:20; s=...

7 years ago | 0

| accepted

Answered
How to delete columns from something that isn't a matrix
EDITED T=readtable('sample.txt'); % your filename T(:,[3 4 5 9 10 12 13 14])=[] Gives: T = 6×7 table Va...

7 years ago | 0

| accepted

Answered
How to compare two matrices with the same dimensions and assign new variables in a third matrix
help ismember % see with 'rows' option

7 years ago | 0

Answered
I need some help with understanding the '2' close to the second d
https://www.mathworks.com/help/matlab/ref/fprintf.html#btf8xsy-1_sep_shared-formatSpec - it's used for printing values see the l...

7 years ago | 0

| accepted

Answered
find array inside a cell
A={[1,2,4],[2,3,7],[2,5],[4,5,6]} ; B=[1;2;3;6;8]; Result=cell(1,numel(A)); % preallocate for i = 1:numel(A) idx=ismembe...

7 years ago | 0

Answered
Solving a Matrix of Independent Equations At the Same Time
syms a b x equ = x == a.*x - 9.*b.*x.^2 + 128; answers=solve(equ,x); [a,b] = ndgrid(-2:2:2,-3:3:3); Answers=matlabFunction(a...

7 years ago | 0

| accepted

Answered
ode45 error problem in following code
doc ode45 % please read the documentation

7 years ago | 0

| accepted

Answered
how do i plot the graph of Cp versus a if Cp=4a(1-a)^2 and a=(u-v)/2u
u=....values v=....values a=(u-v)./(2.*u); Cp=4.*a.*(1-a).^2 ; plot(Cp,a)

7 years ago | 0

| accepted

Answered
Calculate different rowss in a matrix
save it as a cell using {}

7 years ago | 0

Answered
i have one variable which has value in an array and i want to make the power of all the value of array by another variable but getting value zero.any possible solution?
sym(alpha).^lambda % no loops needed Gives: ans = 1/1000000000000000000000000000000000000000000000000000000000000000000...

7 years ago | 0

| accepted

Answered
Why I cannot define a function in live script?
It clearly mentioned in the documentation below: https://www.mathworks.com/help/matlab/matlab_prog/local-functions-in-scripts.h...

7 years ago | 2

| accepted

Answered
how do i combine several matrix in one
https://www.mathworks.com/help/matlab/import_export/process-a-sequence-of-files.html

7 years ago | 1

| accepted

Answered
How to extract certain rows from an excel file?
Use readtable() to read the file and then extract only the required datas.

7 years ago | 0

Answered
Making odd rows equal to zero in a 3x3 Matrix
Since M is a matrix use subsript indexing https://www.mathworks.com/company/newsletters/articles/matrix-indexing-in-matlab.html...

7 years ago | 2

| accepted

Answered
write a matlab command to find th roots of: ax^2+bx+c=0
help roots doc roots help poly2sym doc poly2sym

7 years ago | 0

Answered
Function definitions are not permitted in this context.
See https://www.mathworks.com/matlabcentral/answers/437732-error-using-ofdm_mod-not-enough-input-arguments#answer_354468 how to ...

7 years ago | 0

Answered
How do I turn my function into a column vector?
ht = linspace(0,10,1001); h = sin(ht); %This is based on the instructions as given in the help browser on the page %for ode45...

7 years ago | 0

| accepted

Load more