Answered
How can I put a struct output into the i-th field of a struct on MATLAB?
Use dot indexing to create a struct() , see https://www.mathworks.com/matlabcentral/answers/321489-how-can-i-create-a-structure-...

7 years ago | 0

Answered
How can I retrieve the numbers that appears only one time in a cell?
unique([cell{:}])

7 years ago | 1

| accepted

Answered
Tables automatic import from txt
use readtable() to read the text file

7 years ago | 0

| accepted

Answered
Drawing a function graph?
see fplot()(link) Use syms x and use fplot() to plot the function

7 years ago | 0

| accepted

Answered
How to use exp for plot?
x=linspace(0,7) a= 1; b= 3; f = exp(-a.*x).*sin(b.*x) plot(x,f)

7 years ago | 1

| accepted

Answered
How can I delete the rows of a matrix in matlab under a given condition
EDITED %Numbers greater than 100 idx = matrix > 100; matrix ( ~ ( sum ( idx , 2) == 0 ) , : ) = [] %________________________...

7 years ago | 1

| accepted

Answered
Convert a symbolic expression to string
https://www.mathworks.com/matlabcentral/answers/312339-how-to-convert-strings-to-symbolic-expressions-without-sym#answer_243406 ...

7 years ago | 0

Answered
Storing Data into a Matrix from a for loop
position = zeros(1,1000); position(1)=0; tails = 0; heads = 1; for s = 2:1000 x=randi([0 1]); if x==tai...

7 years ago | 0

| accepted

Answered
It doesn't start
It's better to contact mathworks support team by clicking the Contact Us button on the top right corner of this page

7 years ago | 0

Answered
Finding the index at which the elements of one vector closely resemble the elements of another of another vector.
Read about ismembertol() : idx=ismembertol(t,t1,0.01) % idx is the indices , 0.01 is the tolerance

7 years ago | 0

Answered
How to loop through a matrix, one row at a time using a for loop and conditions
Read about logical indexing: Matrix = [20,5; 30, -6; 40,8; 50,10]; for i = 1:size(Matrix,1) if Matrix(i,1)<0 || Matrix(i,2)<0...

7 years ago | 4

| accepted

Answered
How to graph two solutions in one continuous plot?
EDITED clear all clc axis manual; close all; global lamdax Dx beta q Dy eta k u lamdaz c C1 K1 Dw p C2 K2 rho Dz f Cm ...

7 years ago | 1

| accepted

Answered
write code function with two Variables
Logical Indexing

7 years ago | 0

| accepted

Answered
fourier transform plot on matlab
Use fft()

7 years ago | 0

Answered
From vector to matrix reshape every ith rows for each column
use repmat() for copying >> arr = [1; 2; 3; 1; 2; 3; 1; 2; 3; 1; 2; 3] mat=repmat(arr,1,3) arr = 1 2 3...

7 years ago | 0

Answered
How can i read Date column of an excel file?
use readtable() instead of xlsread because by default readtable can read dates

7 years ago | 0

Answered
Is it possible to write this equation as one equation in matlab?
why not see int() and integral()

7 years ago | 0

| accepted

Answered
How to change HH:MM:SS string data to HH.MM.SS ?
see datetime()

7 years ago | 0

Answered
how to plot exponential function
syms t x=exp(-1000*abs(t)) fplot(x)

7 years ago | 3

| accepted

Answered
comparing the two column in MATLAB
rowswithidenticalvalues=find(A(:,1)==A(:,2)) %1 indicates the values are the same

7 years ago | 2

| accepted

Answered
why If statement is not work?
Read https://www.mathworks.com/matlabcentral/answers/428770-why-isn-t-matlab-counting-this-as-equal-to-1#answer_345891 and https...

7 years ago | 0

| accepted

Answered
How to vectorize 'for' loop in this code?
You can preallocate output before the loop but to store the output your first way is the only way.

7 years ago | 0

Answered
How to sum and plot a series of functions?
Loop not necessary use cumsum() instead y = 120; x = linspace(1,27,24); k = 1:24; a(k) =cumsum((2/pi).*((1-(-1).^k)/k).*sin...

7 years ago | 1

Answered
how can I find the max value of frequency? This is my code
Why not? [value,index]=max(frequency)

7 years ago | 1

| accepted

Answered
When L is not unique, how can I choose any of L
[value,idx] = max(L) s=S(L==value) result=s(randi([1 numel(s)],1)) %picks any of L out of three numbers

7 years ago | 0

| accepted

Answered
how can sort the numbers according to the numbners in the first column
By logical indexing you can do it: a=x(:,1) b=x(:,2) first=b(a==1) second=b(a==2) third=b(a==3) Note: It is assumed that x...

7 years ago | 1

Answered
Why do I get the error message "Subscripted assignment dimension mismatch"?
see https://www.mathworks.com/matlabcentral/answers/93586-why-do-i-get-the-subscripted-assignment-dimension-mismatch-error-messa...

7 years ago | 0

Answered
2nd order ode where the user inputs the ode
Try the below it works: syms y(x) a=input('introduce your ode : ') ysol=dsolve(a,y(0)==1)

7 years ago | 0

Load more