Answered
I have problem in plot
% F is a vector, use |*.**| instead *** er=[2,4.3,5.4,6.2,7.6,8.5,10.3,12] freq=1 h=.16; con=10^7; lt=0.0...

14 years ago | 0

| accepted

Answered
Outputing a high and low value based on a negative or positive signal
Use a |*sign*| block from |*simulink/Math Operations*| . Pass your signal through |*sign*| block . the output will be |*0 if u<0...

14 years ago | 0

Answered
problem calculating ifft/fft
|*X(0)= x[0]*exp(-j*0*0*2*pi/1)*| % with |*x(0)=6*| what will you find? If you want fft of vector v=rand(10,1) V...

14 years ago | 0

Answered
How to find how many times a particular number occurred in large random sequence and their respective occurence position
data=randi(2,1000,8)-1; v=[0 1 1 0 0 0 1 0]; idx=find(~any(cell2mat(arrayfun(@(x) data(x,:)-v ,1:size(data,1),'un',0)'...

14 years ago | 0

Answered
What is the easiest way to adjust PID parameters during a simulation?
You can use a *|slider gain|* block

14 years ago | 0

Answered
Help in creating Matrix
A=magic(2);B=[1; 2]; n=5 p=cell2mat(arrayfun(@(x) [zeros(x,1) ;(1:n-x)'] ,(1:n)','un',0)') C=cell2mat(arrayfun(@(x) [zeros(...

14 years ago | 0

Answered
Reduce one dimension of a array by using sum
A=rand(100,100,100); out=sum(A,3)

14 years ago | 1

Answered
extract the same coloumn from multiple mtrix
M=[] for k=1:8 s=['M=[M' sprintf([',device%d_%d(:,70)'],[k*ones(1,80);(1:80)]) ']'] eval(s) end

14 years ago | 0

Answered
variables in Simulink Workspace
If it's In workspace, means it's recognized by m file. check your to workspace block, then set |*save format*| to |*array*|

14 years ago | 0

Answered
iam having a matrix of (128*128*24)and another of 128*128 double..how can i concatenate this..
your first matrix A size is 128*128*24. If you concatenate any matrix to A the result size, obviously will change! why are you e...

14 years ago | 0

Answered
How to get the output for the following code into the workspace?
function dy=equation(t,y) global c b1 b2 b3 y1 y2 y3 y1=y(1);y2=y(2);y3=y(3); dy=zeros(3,1); b1=b1+1-exp(-b3) b2=b1-y(1) ...

14 years ago | 0

Answered
Replace NaN value to blank in excel
num=xlsread('YourFileName.xls'); num(:,3)=[]

14 years ago | 0

Answered
Solving a 2 input, 2output, 4state model
Remove the |*hold on*| before the |*lsim*| command %hold on lsim(sys_mimo,u,t,x0)

14 years ago | 0

| accepted

Answered
save image with plotings
set(gcf, 'PaperUnits', 'points','PaperPosition', [0 0 768 1024]); saveas(gcf,'fig1.jpg')

14 years ago | 0

Answered
Selection Portions of a Plot
t=0:0.1:30 y=sin(t) [peaks,idx]=findpeaks(y) %the third peak is peaks(3)

14 years ago | 0

| accepted

Answered
Two functions superimposed on each other.
t=0:0.1:10 plot(t, sin(t)) hold on , plot(t+pi/4,sin( t + pi/4) )

14 years ago | 0

| accepted

Answered
Group data by 2 condiitions
A={'A Type1 10' 'A Type2 10' 'A Type1 25' 'B Type2 12' 'B Type1 36' 'C Type1 45' 'C Type3 17' 'C Type2 40 '} B=cellfu...

14 years ago | 0

Answered
Group data by 2 condiitions
A={'A Type1 10' 'A Type1 10' 'A Type1 25' 'B Type2 12' 'B Type1 36' 'C Type1 45' } B=cellfun(@(x) regexp(x,' ','split'),A,'u...

14 years ago | 0

Answered
Question of peak amplitude measuring
You must specify in wich interval, because at a time t=t1 we don't know if the signal will continu to increase or will decrease....

14 years ago | 0

Answered
Error message Undefined variable isnan
final_n=rand(2705,5); for i=1:2705 borntime(i)=min(find(~isnan(final_n(i,:)))); end the error was in ~isnan(final_...

14 years ago | 0

| accepted

Answered
setting the step of x and y axes
t=0:0.1:10 y=cos(t) plot(t,y) set(gca,'xtick',linspace(min(t),max(t),8),'ytick',linspace(min(y),max(y),8))

14 years ago | 0

| accepted

Answered
making new objocts out of the content of a cell vector
B = {'USA' 'GER' 'JAP'} B=[B;num2cell(1:numel(B))]

14 years ago | 0

Answered
Time stamp using xlswrite
clox=cellstr(datestr(now)) xlswrite('d:\repeati.xlsx',clox,'E5:E5');

14 years ago | 0

| accepted

Answered
about Local Oscillator block
* The frequency is the repetition of your signal * The sample time is the interval of time between two values of your signal ...

14 years ago | 1

Answered
Save part of a big matrix to *.mat of another name
abc = rand(2,3,3); abc2=abc(2,:,:) save('new.mat', 'abc2')

14 years ago | 0

Answered
Enter symbolic multivariable equalities in matlab
syms theta nu a ue b x0 x equation=theta^2*ue^b/nu-a*int(ue^(b-1),x0,x)

14 years ago | 0

Answered
creating an input list from a large data set
folder='C:\Lisajustin\vib\' list=struct2cell(dir([folder '*.csv'])); Listdir=list(1,:)

14 years ago | 0

Answered
what is local and global variable?and difference ?
each function has it's own local variables, these functions communicate through inputs and output arguments. If we want cert...

14 years ago | 2

| accepted

Answered
Indexing several Data files to extract a column from each file
A=zeros(15000,1000); for k=1:1000 filename=sprintf('file%d.xls',k) num=xlsread(filename) A(:,k)=num(:,2) end

14 years ago | 0

| accepted

Answered
How to simulate Stateflow?
In matlab command run mex -setup then choose your compiler. If you have a 32bits OS you will find at least |*LCC*| compi...

14 years ago | 1

Load more