Answered
Determination of y coordinate of a curve that intersects x axis ?
t=linspace(0,20) y=sin(t) ec=0.1 idx=find(abs(y)<=ec) t(idx)

14 years ago | 0

Answered
Matlab does not give the right answer
Check if your file *filename_2* exist in your folder

14 years ago | 0

Answered
finding the nearest valaue
s=[ 38.9906 27.8590 18.6908 25.0184 27.5565 24.7551 21.6141 30.9522 42.2398 52.9675 38.4323 45.0781...

14 years ago | 0

Answered
Sorting matrix with specifications for the order
A=[0 0 1;0 0 2;1 1 1]; [~,idx]=sort(sum(A.^2,2)) out=A(idx,:)

14 years ago | 1

Answered
multiple number of inputs n
n=input('enter the value of quereis','s') if separated with comma out=regexp(n,',','split')

14 years ago | 1

| accepted

Answered
linking values in command window to simulinl
ty=[t' y'] In your Simulink model use *From Workspace* block from *Simulink/Sources* and set *data* to *ty*

14 years ago | 0

| accepted

Answered
how to read data file with rows of different length
fid = fopen('file1.txt'); line1 = fgetl(fid); res=line1; while ischar(line1) line1 = fgetl(fid); res =char(res,line1)...

14 years ago | 4

Answered
split up file name into strings...
s='curr_1.564_image_002.tiff' idx=regexp(s,'_') ii=regexp(s,'.tiff') curr=str2num(s(idx(1)+1:idx(2)-1)) image=str2num(...

14 years ago | 0

Answered
Index with min command
NE = 100; t = linspace(0,2,2*NE); T = linspace(0,1,2*NE); val=[]; index=[]; for ii = 1:NE [val1,index1] = min(ab...

14 years ago | 0

Answered
how does matlab read matrix
A=[1 2 3;4 5 6;7 8 9] the result is 1 2 3 4 5 6 7 8 9

14 years ago | 0

Answered
matlab 2012b: manual switch
If you need multi-input use several manual switch <<http://azzimalikcom.ipage.com/manual_switch.jpg>>

14 years ago | 0

Answered
Can you operate over two structured arrays with the same field names and kind of content?
model1=struct('set1',randi(100,100,1),'set2',randi(100,150,1)); model2=struct('set1',randi(100,100,1),'set2',randi(100,150,1)...

14 years ago | 0

Answered
how to merge two matrices
Horizontal concatenation c=[a b] example for horizontal concatenation a=rand(20,6); b=rand(20,3); c=[a b] f...

14 years ago | 0

| accepted

Answered
Amplitude Modulation using simulink
If the carrier frequency is 20 Khz, then your fixed step size must be less then 0.00005. I will set *fixed step size=0.000005*

14 years ago | 0

| accepted

Answered
From 2 vectors of n elements To n points
A=1:4 B=sin(t) scatter(A,B)

14 years ago | 0

Answered
how can I do Iteration in matlab
save this function with the name *dif_eq* function da=dif_eq(x,a,tim,f) f1=interp1(tim,f,x) da=(f1-a)/x; then call th...

14 years ago | 0

| accepted

Answered
Replacing zeros in a matrix with an interpolation
Ok, if the first line is different from zero a= [1,1,1;2,0,2;0,3,3] inc=1; idx=find(~a) a(idx)=a(idx-1)+inc

14 years ago | 0

| accepted

Answered
How do I plot this?
Look at *plot* documentation <http://www.mathworks.com/help/matlab/ref/plot.html>

14 years ago | 0

Answered
Comparing lists of strings
List_one='is smaller than' List_two='they are both cell arrays' idx=find(ismember(List_one,List_two))

14 years ago | 2

Answered
Calculate roots of equations
use *roots* function example A=[1 2 1; 4 5 8; 8 9 7] sol=cell2mat(arrayfun(@(x) roots(A(x,:)),(1:size(A,1)),'un',0))'

14 years ago | 0

| accepted

Answered
3d track plot in Matlab (ex-embedded) Function block
Save your data to workspace, then plot what you want!

14 years ago | 0

Answered
how can I do Iteration in matlab
save this funnction with the name *dif_eq* function da=dif_eq(x,a) f=sin(x); for example da=(f-a)/x; then type in Matl...

14 years ago | 0

Answered
increasing sinewave in simulink
t=0:0.1:10;y1=sin(4*t); y=reshape(bsxfun(@times,repmat(y1,3,1)',[1 3 5]),1,[]); close,plot(y)

14 years ago | 0

Answered
How to plot the following in matlab
e.g x=0:0.1:10 y=(x.^2+sin(x))./(x+1); % .*, .^, ./ are operations element by element plot(x,y) help plot

14 years ago | 0

| accepted

Answered
scatter plot with non-linear axis
x=1:10 y=sin(x) x1=1./2.^(-1:length(x)-2), scatter(x1,y)

14 years ago | 2

| accepted

Answered
change axis of a plot
set(gca,'xtick',linspace(min(x),max(x),7),'ytick',linspace(min(y),max(y),7)) what do you mean by : *how to do broken axis*

14 years ago | 0

Answered
Calling multiple cell elements at once
B=cell2mat(A); out=B(1:3:end)

14 years ago | 0

| accepted

Answered
How to convert a signal from H(jw) to H(z)
If *Y* is your fourier transform Out=ztrans(ifourier(Y)) % this uses a symbolic tooolbox

14 years ago | 0

Answered
newbie GUIDE passing data through popup windows
you can store those data in Userdata of any of your objects set(handles.yourobject,'Userdata',data) use data=get(han...

14 years ago | 0

Answered
Easy way to clean up a plot?
Try a Butteworth filter

14 years ago | 0

Load more