Answered
How to display output in GUI
doc guide

13 years ago | 0

Answered
Find the minimum of a function
Maybe you are looking for <http://www.mathworks.com/help/matlab/ref/fminsearch.html fminsearch> help fminsearch

13 years ago | 0

| accepted

Answered
plot using a for loop on same figure
If you want 3 in the same figure, use *hold on*, and remove from the loop *i=figure*. If you want 3 figures, that's what your co...

13 years ago | 0

Answered
Buildind special vector? V(3)=V(6)=V(9)...=0
V=[1 1 0 1 1 0 1 1 0 1 1 0] N=3 V(N:N:end)=0

13 years ago | 0

Answered
Plot 2d line from matrix data
plot(A(:,1),A(:,2)) Example A=[1:100;rand(1,100)]' plot(A(:,1),A(:,2))

13 years ago | 1

| accepted

Answered
Solving 3 equations with 3 unknowns
syms me ve mo mp eq1=0.0972-ve*log(mo/me) eq2=0.11285-ve*log((mo-1010*mp)/(mo-2145*mp)) eq3=0.10953-ve*log((mo-...

13 years ago | 2

Answered
Sort rows or cells (descending first column) where second column has repeated value
Use sortrows B=flipud(sortrows(A,1))

13 years ago | 1

| accepted

Answered
matlab 2008 won't open
Undo the update of Java by restoring your system.

13 years ago | 0

| accepted

Answered
How to create 3D sine array?
reshape(Sig,1,1,numel(Sig))

13 years ago | 0

Answered
How can I upload a mixed data file where I can identify cell strings as well as numbers?
There are many ways help textscan help fgetl If your file is an xls format use xlsread

13 years ago | 0

Answered
Transferring Data between Cell Arrays
clear B A=num2cell(rand(20)) B(1:6,1:8) = A(6:11,1:8);

13 years ago | 0

Answered
Bar graphs - color coding..
close a = [10 20 30 25 15] b = [1 3 2 1 4] cl='rgbmc' for k=1:numel(a) bar(k,b(k),cl(b(k))) hold on end set(...

13 years ago | 0

| accepted

Answered
Removing zeros from a m x n x p matrix.
A=rand(6,3,5,5) for k=1:size(A,4) B{k}=A(:,:,:,k) end A4=B{4} A4(:,:,4:5)=[]

13 years ago | 0

| accepted

Answered
adding to a Directory
f=dir('yourfolder/*.pgm') files={f.name'} for k=1:numel(files) copyfile(['yourfolder/' files{k}],['NewFolder/' files{k}]...

13 years ago | 0

Answered
placing elements of a cell array into a matrix
out=[] for m=1:length(A) out=[out ; B';A{m}(:,1)] end

13 years ago | 0

Answered
How to solve a system of linear equations ?
sol=[1 1 1;5 1 0.1]\[50;50]

13 years ago | 0

Answered
adding to a Directory
imwrite(im,'yourfolder/image.pgm')

13 years ago | 0

Answered
Vector Indexing into 2D array
r=[2 3 2] c=[1 2 3] A=magic(3) idx=sub2ind(size(A),r,c) out=A(idx)

13 years ago | 0

| accepted

Answered
How to plot a data set with shift in axis?
close x1=1:100 y1=sin(0.1*x1); x2=50:100; y2=cos(.2*x2) plot(x1,y1); hold all plot(x2,y2)

13 years ago | 0

| accepted

Answered
comparing two vectos and inserting where numbers are missing
b=[1000 5 2000 10 3000 0 4000 15 ...

13 years ago | 0

Answered
Function handles as function output
*A* is *v*, you do not need to get *A*

13 years ago | 0

Answered
How scale output window
set(gcf,'position',[0 0 100 100]) You can also set units: x0=0; y0=0; width=8 % inches height=6 %inches set(gcf,'u...

14 years ago | 0

| accepted

Answered
Finding difference between two curves
y1=rand(1,10); y2=rand(1,12); y3=rand(1,15); out=y3-mean([y1 y2])

14 years ago | 0

| accepted

Answered
How can i save all the numbers in an array, generated by an equation inside nested for loop ?
k=0 for i = 1:1:numel(xP1) for j = 1:1:numel(yP1) if(i ~= 500 && j ~= 500) k=k+1 a(k) = s...

14 years ago | 0

Answered
How to measure the distance between 2 sets of points.
M1 & M2 are your two matrices M1=rand(10,2); M2=rand(10,2) dist=sqrt((M2(:,1)-M1(:,1)).^2+(M2(:,2)-M1(:,2)).^2) min_d...

14 years ago | 0

Answered
Index must be a positive integer or logical. Very simple program.
function a=a5folge(n) a=zeros(n+1); a(1)=sqrt((25+2*sqrt(55))/27); for k=1:n a(k+1)=psi(a(k)); end end function p...

14 years ago | 0

Answered
Can I have same plot colors between 2 different figures?
Example t=0:0.1:10 y11=cos(t) y12=2*cos(t) h1(1)=plot(t,y11) hold on h1(2)=plot(t,y12) set(h1(1),'color','red') set(...

14 years ago | 0

Answered
How to convert m-file to simulink block ?
What you can do is to use <http://www.mathworks.com/help/simulink/slref/matlabfunction.html Matlab Function> block or <http://ww...

14 years ago | 1

Load more