Answered
Am I finding the Step and Impulse Response Correctly?
t=0:0.1:10 step([1],[1,3],t); %or y=step([1],[1,3],t); plot(y) %and impulse([1],[1,3],t); %or y=impu...

14 years ago | 0

| accepted

Answered
How to sort a structure by numbers in one of its fields?
s=fieldnames(x) c=char(s) s1=cellfun(@(x) (regexp(x,'\d+','match')),s,'un',0) s2=cellfun(@str2double,s1) [s3,idx]=sort(s2)...

14 years ago | 1

Answered
minimum of a 3D matrix
M=rand(2,2,3); out=min(reshape(min(M),size(M,2),[],1))' or out=arrayfun(@(x) min(min(M(:,:,x))),1:size(M,3))' If y...

14 years ago | 0

| accepted

Answered
Simulink: Generate a random number, but only update when triggered
<<http://azzimalikcom.ipage.com/ansf265.jpg>>

14 years ago | 0

Answered
Can Matlab generate a function based on XY points?
You can use a Curve Fitting toolbox

14 years ago | 1

Answered
How to draw a white circle ?
r=4; %radius x0=0;y0=0; % circle center coordinates x=x0-r:0.01:x0+r y=sqrt(r^2-(x-x0).^2)+y0; fill([x0-r x0+r x0+...

14 years ago | 0

| accepted

Answered
Question on modelling system dynamics
N=1;D=[1 2]; G=tf(N,D) t1=0:0.1:6; t2=6+0.1:0.1:20; t=[t1 t2] u_step=ones(1,length(t)) u_step(1:length(t1...

14 years ago | 0

Answered
How to add plots to a plotyy and enlarge the abscissa?
Your code is correct, you have just to set xlim The second part of your code: hold(AX(1)); plot(129,9.4,'k+','linewidth...

14 years ago | 0

Answered
Datacursor at specified X-posision to give value of Y-axis
If the value 0.666 exist in your plot, there is no reason that data cursor don't find it. Check if the value 0.666 exist in your...

14 years ago | 0

| accepted

Answered
how to give multiple inputs of same category to a single terminal through switching ?
use three repeating sequences stairs block * the first block to set with 1 0 0 * the second 0 1 0 * the t...

14 years ago | 1

| accepted

Answered
how to make a code with for loop for undetermined index
save this function function level=level_fc(p,c,level1) level=[]; for i=1:length(p) a=[p(i),c(i)]; if isequal(...

14 years ago | 1

| accepted

Answered
How create a signal?
save this function function p= puls(w,A,t) % w:pulse width % A:pulse amplitude % t:time vector n=length(t); p=zeros(1,...

14 years ago | 0

| accepted

Answered
How to plot a 16 channels graph
data=load ('sub1_export'); t=data.EEG_SAMPLE.time; y=data.EEG_SAMPLE.signals.values; out=reshape(y,16,[],1) plot(t,out)...

14 years ago | 0

| accepted

Answered
How to do indexing without moving to a new variable ?
sum(sort(x,'descend').*[ones(1,3) zeros(1,2)])/3

14 years ago | 2

Answered
Index must be a positive integer or logical.
The problem is in R1_te = R1_rk4(ie1); what is the value of ie1 ie1 must be a positive integer or logical.

14 years ago | 0

| accepted

Answered
Is it possible to have a vector that full of decimal data in it, and sum them up.
maybe you did something like sum=12 which destroy your function, try to clear it clear sum Exact=((pi)^(4))/90; a=1:1:200...

14 years ago | 1

Answered
Find coefficient in symbolic expression or matrix in matlab
syms x y z u=2*x+3*y+4*z [c,t] = coeffs(u, [x y z])

14 years ago | 1

Answered
How to remove the matlab system
If you are using windows * control panel * programmes and features * select Matlab then uninstall It will remains some f...

14 years ago | 0

Answered
How to store scalars(continuous data) as a vector
<<http://azzimalikcom.ipage.com/ansf263.jpg>>

14 years ago | 1

| accepted

Answered
connect resistor element to signal generator
connect your signal generator to a controlled voltage source or controlled current source, then connect the output to your resis...

14 years ago | 0

| accepted

Answered
is there any component in simulink library that work as oscilloscope ?
A scope from Simulink/Sinks

14 years ago | 0

Answered
Need help with difference equation
It's easier to solve it in discret time domain y(1)=1 y(2)=1 for n=3:7 y(n)=-y(n-1)-y(n-2) % equivalent to y(n+2)=-y(n...

14 years ago | 1

| accepted

Answered
Random pulse generator
use this block <<http://azzimalikcom.ipage.com/ansf361.jpg>> the function is function y = fcn(u) %#codegen id=rand(...

14 years ago | 0

| accepted

Answered
Place string in front of vector
[ '[' sprintf('B%d ',1:16) ']']

14 years ago | 1

Answered
Understand if a char variable is an alphanumeric, a numeric or a string
class(var) % returns a class of var ischar(var) % returns 1 if var is char, 0 otherwise look at , isnan, isinf, is...

14 years ago | 1

Answered
How can i select (check off) multiple checkboxes?
for ii = 1:5 set(handles.(sprintf('chk%d',ii)),'value', 1) end

14 years ago | 3

| accepted

Answered
how to add string matrix to numeric matrix?
a={'rice';'corn';'wheat'} b=[3;4;3] c=arrayfun(@(x) [a{x} ' ' num2str(b(x))],1:3,'un',0)

14 years ago | 0

Answered
Least Squares Regression, Help me find the error in my code!
There is a problem in your x array size, it should be a matrix (nxm) where m is the length of y and m is the lenngth of unknown ...

14 years ago | 0

Answered
Interpolation points for determining values in between known data points
function [y1, y2, y3] = MyInterpolator() x =[ 1 2 3 4 5 6 7 8 9 10] y=[ -2 3 -4 6 -7 10 -17 25 -26 30] plot(x,y,'...

14 years ago | 0

Load more