Answered
How to determine what grid cell a given point is in?
You can use [xx,yy]=meshgrid(x,y)

11 years ago | 0

Answered
what does 'b' denote in this code.please tell me I am cofused with it?
Just run this, you will understand b=zeros(4,3) or a=[2 1 3] n=length(a) b=zeros(1,n)

11 years ago | 0

| accepted

Answered
How to remove a signal from a timeseries (the signal is known and the same length as timeseries)
Look at this example t=0:0.1:10 y1=sin(t) y2=t.^2 plotyy(t,y1,t,y2) h=findobj(gcf,'type','axes') delete(h(1))

11 years ago | 0

Answered
How to standard ticks on x-axis?
plot(0:24) set(gca,'xtick',0:24) Look also doc xticklabel

11 years ago | 0

| accepted

Answered
Delete a row of a cell containing a certain number
A=A(A(:,2)>=0.001)

11 years ago | 0

| accepted

Answered
How to loop 100 txt files through a folder
<http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F>

11 years ago | 0

Answered
How to remove unwanted X from Xdata
idx=y2<0.25; y2(idx)=[]; x2(idx)=[]

11 years ago | 1

Answered
I'm looking to search a String for a given value and then, if this value is found (anywhere in the string), I want to replace the entire string with a new one. Is this possible with regexprep?
What you want is to replace a '+' by a blank String = 'abcdefghijklmnop+qrstuvwxyz' String= regexprep(String,'+','') ...

11 years ago | 0

Answered
Alternating equations every other row
A= [3 2 1;3 8 2; 3 9 2;9 5 1; 3 8 3; 7 4 2] sg=ones(size(A,1),1) sg(2:2:end)=-1 (A(:,1)-A(:,2)).*sg

11 years ago | 0

Answered
Turn inequalities into equalities
syms x y z eq={2*x >= y, 2*z >= y, 2*x+y <= 4, 2*z+y <= 4} out=cellfun(@(x) sym(regexprep(char(x),'<=|>=|<|>','=')),eq([1 3]...

11 years ago | 0

Answered
Extracting specfic columns based on a matrix
B (ismemeber (B(:,191), A),191:194)

11 years ago | 0

| accepted

Answered
Fprintf question and application.
Write this, you will understand fprintf( '%50sVIII\n', 'Henry' )

11 years ago | 0

| accepted

Answered
Vertically Concatenate Cells with Same Number of Columns
cell2mat(YourCellArray) Or Maybe your data looks like a={num2cell(rand(2,3));num2cell(rand(1,3));num2cell(rand(4,3))};...

11 years ago | 0

Answered
How to plot smaller o's using plot(x,y,'o')
t=0:0.2:10 y=sin(t) h=plot(t,y,'o','MarkerSize',3),

11 years ago | 1

Answered
How can I assign values to a changing string in a loop?
Bad idea to create all these variables. Read this <http://matlab.wikia.com/wiki/FAQ#How_can_I_create_variables_A1.2C_A2.2C....2C...

11 years ago | 0

Answered
How to delete a row if it doesn't follow a pattern?
You can adapt the answer of your previous question <http://www.mathworks.com/matlabcentral/answers/229434-delete-row-not-followi...

11 years ago | 0

Answered
How to find same elements in a cell array?
a={[1,2,4,5] [1,4,2,5] [1,2,4,5] [4,1,5,2] [1,2,4,5] [1,4,2,5]} b=cell2mat(a') [ii,jj,kk]=unique(b,'rows') out=[ii accumarr...

11 years ago | 2

| accepted

Answered
how to frame equation
Read the documentation <http://www.mathworks.com/help/matlab/getting-started-with-matlab.html>

11 years ago | 0

Answered
Using 1s and 0s to change data to NaN
A = [1,2,3,4,5,6,7,8] B = [0,1,1,0,1,0,0,1] C=A; C(~B)=nan

11 years ago | 0

| accepted

Answered
Creating a 3 Dimensional Array with Elements Automatically Filled In
Maybe you need to use meshgrid function a=0.8:0.1:1.2 b=4:1:6 c=0.7:0.1:0.9 [x,y,z]=meshgrid(a,b,c) out=[x(:) y(:) z(:)...

11 years ago | 0

Answered
Creating a 2D array of ranges from multiple 1D arrays, no for loop
For this case, I think, there is not faster then a for loop

11 years ago | 0

Answered
How create vector with while loop
You have to know how to write <http://www.mathworks.com/help/matlab/logical-operations.html logical operations> in Matlab In ...

11 years ago | 0

| accepted

Answered
Can I create a vector with a specific pattern in Matlab?
n=100; ri=1:1:n v=[ ri(3:n)' ri(2:n-1)' ri(1:n-2)' ] cr=[1 -2 1] out=sum(bsxfun(@times,v,cr),2) Or n=100; ri=1:1:...

11 years ago | 1

| accepted

Answered
Empty matrix: 0-by-1
A=[1 2 3] find(A==5) The result is ans = Empty matrix: 1-by-0 Because 5 is not found in A

11 years ago | 0

Answered
How to load data from a location other than current directory
data=load('C:\users\me\Documents\MATLAB\data\example_data.mat') data is a struct variable, for example: data= a:...

11 years ago | 5

| accepted

Answered
how to Create random signal
Create a mat file like this one t=0:0.1:10 y=rand(1,numel(t)) ty=[t;y] save filename ty In your simulink model add th...

11 years ago | 0

Answered
How to plot with repeating values in the abscissa vector?
x=1:48 y=sin(0.1*x) h=scatter(x,y) set(gca,'xtick',x,'xticklabel',arrayfun(@num2str,0:23,'un',0))

11 years ago | 0

| accepted

Load more