Answered
How to align the figure name to the left ?
title('yourtitle','position',[1 1])

14 years ago | 0

Answered
Shifting a multidimensional matrix
A=randi(10,4,8,2,4,4,3); offset=[2 2 1 2 1 2]; siz=size(A); n=numel(siz); out=zeros(siz); idx1=sprintf('%d...

14 years ago | 1

Answered
Shifting a multidimensional matrix
offset=3 A=rand(10,12); [n,m]=size(A) out=zeros(n,m) out(:,offset+1:m)=A(:,1:m-offset) If your matrix is nxmxp ...

14 years ago | 1

Answered
ending a GUI by exiting it, and making an exe file application from it-
you can use deploy tool, to make an executable

14 years ago | 0

Answered
Testing for the presence of a substring in a cell array of strings
x = {'qwer','asdf','zxcv'}; out=any(cell2mat(cellfun(@(y) regexp(y,'xc'),x,'un',0))) or out=any(cell2mat(regexp(x,'x...

14 years ago | 1

Answered
extracting 1 plot out of multiple plots in a fig
select one plot with figure editor then x=get(gco,'Xdata') y=get(gco,'Ydata') plot(x,y)

14 years ago | 0

Answered
the best way to import signal from workspace
in matlab command t=0:0.1:100 y=sin(t) ty=[t' y'] in |*from workspace*| block set variable name to *|ty|* or you c...

14 years ago | 0

Answered
Stacking arrays in a matrix
blabla=[]; %iniitialize for i=1:6 blabla = [blabla,n1.bla]; end I think what you've posted is not enough

14 years ago | 0

Answered
Simulink: How to add an Input Port to Timer
* right click on your timer block * click on disable link * click on look under mask * remove a clock block and replace it wi...

14 years ago | 1

Answered
Creating subsystem for a circuit
just select the model you want to make a subsystem then click on creat subsystem. or copy a subsystem block (from simulin...

14 years ago | 0

Answered
rename file extension from 1.png to 001.png and so on
folder='D:\answers\' for k=1:1 file1=sprintf('%d.png ',k) file2=sprintf('00%d.png',k) dos_com=['!rename ', folder fil...

14 years ago | 0

| accepted

Answered
How to call out rows that contains a value X in column Z of matrix A?
If you have a cell array A={'Value' 'Count' 'Percent' 1 1 '10.00%' 2 3 '30.00%' ...

14 years ago | 0

Answered
Program for matrix multiplication
In your first if use if(n~=k) | m==0 | k==0 C=[]; disp('Error, not able to multiply matrices'); return ...

14 years ago | 0

Answered
Parse a cell array of strings without looping
clear A={'122.8233,216.1323,671.8740' '122.8233,216.1323,671.8740' '122.8233,216.1323,671.8740' '122.8233,216.1323,671.874...

14 years ago | 2

| accepted

Answered
How to calculate the angle between two lines (an urgent help needed)
x1=2 ;y1=4;x2=3;y2=10 x3=1;y3=5;x4=6;y4=20 v1=(x2-x1)+j*(y2-y1) v2=(x4-x3)+j*(y4-y3) teta=angle(v2)-angle(v1)

14 years ago | 0

Answered
Randomly deleting a 'one' in a column of a binary matrix
A=[1 1 1 1 1 1 0 1 1 1 1 1 0 0 1 1 1 1 0 0 ...

14 years ago | 0

Answered
What are the possible ways to solve the following set of equations?
for the first equation use |*fsolve*| <http://www.mathworks.com/help/optim/ug/fsolve.html> for the second equation use |*ode...

14 years ago | 0

Answered
purpose of state-space with pid
clear,close %your model and its input output mot=tf(1,[1 1]), model=ss(mot); [F,h,c,d]=ssdata(model); model.u='u' mod...

14 years ago | 0

| accepted

Answered
How to plot the difference of two different time scaled values in the same plot(Single Plot)
what you can dot is interpolate before calculting x-y example close t1=linspace(0,10,35) x=sin(t1) t2=linspace(1,10,5...

14 years ago | 0

Answered
how to get transfer function for this problem?
you have just to remove the first coefficient from num num=num(2:end) model1=tf(num,den)

14 years ago | 0

| accepted

Answered
how to plot 1000 samples , one sample generating at i mili sec.
hist and stem are not the same. hist command allows to represent distribution of data, but stem command is like plot with the di...

14 years ago | 0

| accepted

Answered
I suddenly cannot save m-files anymore. What can I do about that?
copy your file content to text file(notepad for example), restart matlab, and save your file

14 years ago | 1

Answered
Embedded matlab function for trigger generation
the loop in your matlab function will only generate the last value of y. try this <<http://azzimalikcom.ipage.com/ansf302...

14 years ago | 1

| accepted

Answered
how x-axis and y-axis are selected while using scope block in simulink?
It depends on how you set x or y axis. You also can use autoscale for x axis: set time range to auto for y axis right cli...

14 years ago | 0

Answered
splitting an array of numbers
v=rand(1000,1) offsets = [0, 100, 250, 900, 1000]; out=arrayfun(@(x) v(offsets(x)+1:offsets(x+1)),1:numel(offsets)-1,'uni',...

14 years ago | 0

Answered
How to run two different programs in matlab ?
Lunch Matlab twice,

14 years ago | 1

Answered
problem executing while loop
insert before while |*n=x*|; clc clear a = input('number '); x = input('guess '); tol = 0.0000001; n=x while (abs(...

14 years ago | 0

| accepted

Answered
Why the "sum" function is giving a wrong result in Simulink ???
I recommand matlab function(previously named embedded matlab function) <<http://azzimalikcom.ipage.com/ansf295.jpg>> int...

14 years ago | 0

Answered
how to convert exponentional number into a decimal number
Euc_dist = 1.0e+013 *[ 0.0106 1.9718] x=Euc_dist/1.0e+013

14 years ago | 0

Answered
convert from matlab to C for real time application
use matlab coder toolbox

14 years ago | 0

| accepted

Load more