Answered
How to use one pushbutton to open different images
In your pushbutton callback add this code s=get(handles.listbox1,'string') idx=get(handles.listbox1,'value') im=imread(s{...

13 years ago | 0

Answered
how to plot frequecy spectrum of fft ?
t=-1:0.01:1 y=zeros(1,numel(t)) y(abs(t)<1/2)=1 Y=fft(y) stem(abs(Y))

13 years ago | 0

Answered
What does this mean? (Attempted to access Q(0); index must be a positive integer or logical.)
In Matlab you can not use A(0) or A(-1) or A(1.5) index must be a positive integer or logical: Positive integer are: ...

13 years ago | 0

Answered
How to save the loop data to an excel file in a multilooped program ?
M=[] for k=1:10 for ii=1:10 for jj=1:10 % Your code % If your re...

13 years ago | 2

| accepted

Answered
how to compute VOLUME and surface Area of VRML objects?
From The image, we see that it's constructed using boxes, select each box, check its sizes, then calculate the volume of each bo...

13 years ago | 0

Answered
Problems with the ode solvers
Look at this <http://www.mathworks.com/matlabcentral/answers/66301-solve-a-second-order-differential-equation answer>

13 years ago | 0

Answered
simple 2d x,y plot with another 2 x and y axis enabled
Use <http://www.mathworks.com/help/rf/plotyy.html plotyy> Example x1=0:0.5:10; y1=0.1*sin(0.1*x1); x2=0:0.5:20; y2=0....

13 years ago | 0

Answered
how to write data from workspace to excel?
Use <http://www.mathworks.com/help/matlab/ref/xlsread.html xlsread> and <http://www.mathworks.com/help/matlab/ref/xlswrite.html ...

13 years ago | 0

| accepted

Answered
how to plot random ones and zeros as sequare wave?
n=20 s=rand(1,n)>0.5; s=repmat(s',1,100)' s=s(:)' t=linspace(0,n,numel(s)) plot(t,s,'r')

13 years ago | 2

| accepted

Answered
Divide rows of A by first entry of row
out=A./(repmat(A(1,:),size(A,1),[]))

13 years ago | 0

Answered
Performing operations using variables created by For Loop outputs
This is incorrect expression N(n-11)uik(1,3) Why have you created all those variables, while you could use one array 704...

13 years ago | 1

| accepted

Answered
How to select a MUSIC File which is in .wav format from a LISTBOX and play that music file on clicking the play BUTTON?
d = dir('*.wav'); str = {d.name}; [s,v] = listdlg('PromptString','Select a sound:',... 'SelectionMode','sin...

13 years ago | 0

Answered
Is there a better to multiply matrices with is pattern?
Example A=rand(2) B=rand(1000,1) B=reshape(B,2,[]) out=arrayfun(@(x) A*B(:,x),1:size(B,2),'un',0) % You can get the ...

13 years ago | 0

Answered
Calling a function into a pushbutton in GUI
Just call your function in the callback of your push button

13 years ago | 0

Answered
How to find this parameters..?
Check if your function is in the current folder dir znpidtuning.m

13 years ago | 0

Answered
designing gui for display image in axes
colormap(handles.axes1,map)

13 years ago | 1

| accepted

Answered
Matrix of ratios w.r.t. row or colum header
n=size(A,2) out=A./[ones(1,n);repmat([1 A(1,2:end)],n-1,1)]

13 years ago | 0

Answered
Simulation of a Foucault Pendulum
You are not plotting the right result, you should do [T,Y] = ode45(@focaultPendulum,[0 20],[0.7 0.5 0.6 0.3]); plot(T,Y...

13 years ago | 1

Answered
Finding coordinates of a number
[ii,jj]=find(A==B)

13 years ago | 0

| accepted

Answered
How to create a gird on MATLAB?
You can use <http://www.mathworks.com/help/matlab/ref/uitable.html uitable> f = figure('Position',[ 100 123 785 2...

13 years ago | 1

Answered
Is there a faster way to concantenate this matrix?
Pre-allocate A=zeros(2,1000) A(:,1:2)=A1; A(:,3:4)=A2; %and so on

13 years ago | 0

| accepted

Answered
Is there a function to evaulate factorial(m)/factorial(n) in matlab where m and n is very large but the difference is finite
%If m>n result=prod(m+1:n) %Else result=1/(prod(n+1:m) % factorial(n) is the same as prod(1:n)

13 years ago | 1

Answered
Is there a way to have an option in the conditional go to another part of the conditional?
Look at the <http://www.mathworks.com/help/matlab/ref/if.html documentation> If the first condition is false, automatically i...

13 years ago | 0

Answered
how to decompress MAT files
If you mean load data load filename %or data=load('filename')

13 years ago | 0

Answered
Finding Certain Values In A Matrix
A=[1 2 3 4 5 6; 7 8 9 10 11 12] idx1=find(A<4) idx2=find(A>6) out1=A(idx1) out2=A(idx2)

13 years ago | 0

| accepted

Answered
how to save data in matlab file
You can use <http://www.mathworks.com/help/matlab/ref/save.html save> and <<http://www.mathworks.com/help/matlab/ref/load.html?...

13 years ago | 0

| accepted

Answered
How can I combine values from different columns of a matrix into one single column?
*EDIT* A=[1 4 6;2 nan 14;3 25 nan;4 78 77] B=A idx2=find(isnan(A(:,2))) idx3=find(isnan(A(:,3))) B(idx2,2)=A(idx2,3) B...

13 years ago | 0

Answered
Variable 'a' is undefined on some execution paths. Why?
when *if t <= 1.0e-6* is false a and b are unknown You should declare a and b <http://www.mathworks.com/help/matlab/ref/pers...

13 years ago | 2

| accepted

Answered
Plotting and saving the picture with pcolor
Example list={magic(4),magic(5)} for i=1:numel(list) pcolor(list{i}) ; shading flat; colorbar pause(5) en...

13 years ago | 0

Answered
sampling like this expression
A=[1 5 8 9 7 6 4 5] [val,idx]=min(A) A(idx)=[] b=[9 4] A(ismember(A,b))=[]

13 years ago | 0

Load more