Answered
How to Color Code Multiple 2D plots
You can use c=[0 0 0;0 0 1;0 1 0; 0 1 1;1 0 0;1 0 1;1 1 0;1 1 1] plot(x,y,'color',c(1,:)) plot(x1,y1,'color',c(2,:))...

13 years ago | 0

Answered
double to string in a cell
A={1 2 12 25} B=cellfun(@num2str,A,'un',0)

13 years ago | 0

| accepted

Answered
Convert vector of cells to variables
For k=1:numel(Text) assignin('base',Text{k},num(:,k)) end

13 years ago | 0

| accepted

Answered
Mean a matrix columnwise based on another logical matrix
c=a.*b c(c==0)=nan; out=nanmean(c)

13 years ago | 0

Answered
create a cell array of numbers
str = sprintf('%04d\n',0:1000)

13 years ago | 0

| accepted

Answered
3D Plot- How to do it
x=-100:0.1:100; y=4*x-1/2; z=(14*x-1).*(113*x-31)/100; plot3(x,y,z) %or x=-100:0.1:100; y=4*x-1/2; [x1,y1]=meshgr...

13 years ago | 0

Answered
How can I filter values >120 and <120
A(A<120)=0; A(A>120)=1

13 years ago | 0

| accepted

Answered
summary statistics in matlab
You can create your own function using <http://www.mathworks.com/help/stats/summary-statistics.html summary statistics in matlab...

13 years ago | 1

Answered
construction of matrix using specified data sets
out=zeros(7) out(1,2)=23 out(2,3)=14 out(3,4)=123 out(4,5)=111 out(1,7)=60

13 years ago | 0

Answered
Entering numbers from the keyboard
for k=1:4 xvalue=''; while ~isnumeric(xvalue) test=0; text=sprintf('enter a value n°%d for x',k);...

13 years ago | 0

Answered
converting specific string variables to double
A(~cellfun('isempty',strfind(A,'0')))={0}

13 years ago | 0

Answered
How to change color each loop?
couleur='ym' for k=1:2 plot(ZZ,dTdz3,'.',h,t,couleur(k)) end

13 years ago | 0

Answered
How to find same contents in two array and print them in new array?
C=A(ismember(A,B));

13 years ago | 0

| accepted

Answered
How to plot a BAR chart
X= {'28-30' '22-27' '13-21' '8-12' '4-7'} Y=[ 3 16 70 8 3] bar(Y) set(gca,'xticklabel',X)

13 years ago | 0

| accepted

Answered
matlab code for complex number integration
A=(0.700+1.44i) yourfun=@(x) 0*x+A quad(yourfun,17,25)

13 years ago | 0

Answered
Finding numbers over a value in a matrix/array
range=2 idx=find(abs(yourarray)<range)

13 years ago | 0

Answered
MATLAB and other software?
you can use system('file.doc') % to launch a word document You can also link Matlab with certain applications like Exce...

13 years ago | 0

Answered
different windows for different plots
figure plot figure plot

13 years ago | 13

| accepted

Answered
How to select particular columns in each cell of one cell array?
A{10}(:,10)

13 years ago | 3

| accepted

Answered
How to remove zero values from vector?
q = [0 0 0 2 4 10 9 5 0 0 0 8 9]; out=[q(1:find(q~=0,1)) q(q~=0)]

13 years ago | 0

Answered
doing derivative using diff(Y)/dT makes the vector shorter
*Edit* (x(2)-x(1))/(t(2)-t(1)) correspond to the approximative right derivative at the point(t(1),x(1)). The last point...

13 years ago | 0

Answered
How to Convert 2D matrix to 3D with time as 3rd dimension
A(:,:,k)=B

13 years ago | 1

Answered
division of two 200 by 1 matricies produces: Error using * Inner matrix dimensions must agree
How did you divide? out=A./B % instead of A/B out=A.*B % instead of A*B

13 years ago | 0

| accepted

Answered
How can I pass Axes (GUI) into a function
by handles function []=yourfunction(handles,...)

13 years ago | 2

Answered
Find index of first nonempty cell in array?
A = {['pizza'] ['pepperoni'] ['cheese'] [] []} find(cellfun(@isempty,A),1)

13 years ago | 0

| accepted

Answered
how to do matrix addition of different sizes
C=A C(:,1:3)=A(:,1:3)+B(:,1:3)

13 years ago | 0

| accepted

Answered
How to repeat rows of matrix?
out=cell2mat(arrayfun(@(x) repmat(M(x,:),V(x),1),[1:numel(V)]','un',0))

13 years ago | 0

Answered
I tried using 'FFT' function in MATLAB to transform the given function from time to frequency domain...it gave me the graph but on the x axis the time domain(values) remained the same and did not change into frequency domain as the graph revealed..
The fft function has one output argument, it's the discrete fourier transform of your function. you have to provide the frequenc...

13 years ago | 0

| accepted

Answered
How do I get a figure to open in the currently used Matlab window?
To avoid the problem, open your files from Matlab

13 years ago | 0

Answered
cell multiplication with a vector
Aaf_test = cellfun(@(x) x * fi,Aa,'un',0);

13 years ago | 0

| accepted

Load more