Answered
creating a simple table and edit it.
Use uitable doc uitable

14 years ago | 0

Answered
implementing input signal with 2 different frequencies for different time span
I don't think that you need a parallel computing. You just need concatenation w1=10; w2=20; Tspan1=0:0.01:100; Tspan2= 1...

14 years ago | 0

| accepted

Answered
Isolate Elements in a Vector
If you have just these two cases if ab(end)==0 ab(end)=[] end out=reshape(ab,4,[])

14 years ago | 0

| accepted

Answered
How to add a legend to an existing plot?
t=0:0.1:10; y1=sin(t); y2=cos(t); plot(t,y1,'-g',t,y2,'--r') legend({'y1','y2'})

14 years ago | 1

Answered
String to Variable conversion?
Why are n't you using one array to save your variables, instead of using, v1,v2,... For example data.variable1=10; vari...

14 years ago | 0

Answered
How do i find a difference equation?
Choose your sample time *Te* Te=0.1 % Your sample time N=1.5 D=[1 -0.5] Modelc=tf(N,D) ...

14 years ago | 1

| accepted

Answered
Is there a simple way to rearrange a matrix into a diagonally dominant form?
If I've understood your question a=[1 2 3;4 5 6;7 8 9] diag_som=trace(a) mat_som=sum(a,2) test=any(mat_som>diag_som) ...

14 years ago | 0

Answered
Input values and control menus of GUI's from code?
Create a function with the code you've written, then call it from your gui help function

14 years ago | 0

Answered
Select specific digits of a number
x=953 y=num2str(x) out=str2num(y(1))

14 years ago | 29

Answered
The expression to the left of the equals sign is not a valid target error
In the line az4tit= there is missing *}* at the end

14 years ago | 0

| accepted

Answered
Sum up parts of a vector?
x=rand(105120,1); out=sum(reshape(x,288,[]))'

14 years ago | 2

| accepted

Answered
How I can solve AX+XB=0
Your equation can be written as *C*x=0* with a column vector |x=[x11;x12;x21;x222]|

14 years ago | 0

| accepted

Answered
Automatically Position Text Annotations on a plot.
ylim=get(gca,'ylim'); xlim=get(gca,'xlim') text(xlim(1),ylim(2),'yourtext')

14 years ago | 6

| accepted

Answered
GUI checkbox set visibility
set(handles.checkbox1,'visible','off') % or set(handles.checkbox1,'visible','on')

14 years ago | 5

| accepted

Answered
How to achieve non-repeatable randomization in Stateflow?
You can use a random source *u*, then in your chart add n=12 ceil(u*n) %it's the same as |randi(n)|

14 years ago | 0

Answered
SYSTEM modeling with simulink
you can use, derivative block, and blocks from Simulink/Math Operation

14 years ago | 0

| accepted

Answered
Filling the gaps in a vector
A=[nan;nan;2;nan;4;nan;nan;nan;7;nan;nan;nan;nan] B=A; idx=find(isnan(A)); idx1=fliplr(find(~isnan(A))); for k=1:numel...

14 years ago | 0

Answered
How to extract the first and last position for each ones series ?
You can use x= [ 0 0 1 1 1 0 1 1 0 1 1 1 0 0 1 ] y=[x(1) diff(x)] % to find the first column x1=fliplr(x) % to...

14 years ago | 0

Answered
How do i pause simulink for a moment ?
set_param('yourmodel','simulationcommand','pause') see also, 'continue','stop','update',...

14 years ago | 1

| accepted

Answered
Calculating the velocity (vector) from a 2-Dline
You can calculate the average velocity between two points (x1,y1) and (x2,y2), from time t1 to t2 S=sqrt((x2-x1)^2+(y2-y1)^2...

14 years ago | 1

| accepted

Answered
Anyone know how to normalise my signal ( want to restrict it's range to plus/minus 1 i.e. mean=0)?
y=randi(10,1,100) % your signal new_y=2*(y-min(y))/(max(y)-min(y))-1

14 years ago | 0

Answered
How to select files in a directory
d=struct2cell(dir('IM*.*')); name=d(1,:) for k=1:numel(name) file=name{k} v=str2num(file(6:end)) If v>=25 & v<=52 copyfi...

14 years ago | 0

Answered
Delete a cell in an array chosen by a criterion?
% If your marices are 365x3 x(:,6:6:end)=[]; % x is your cell array x(:,6:6:end)=[]; [n,m]=size(x); for k=1:n fo...

14 years ago | 0

| accepted

Answered
How to change default colors and styles of scope and set new style as default?
Put your scope with its new setting in a library file that you will create.

14 years ago | 1

Answered
NaN when I type "known" variables (like pi, etc) in an editable uitable
If you want to type pi/2, then make your column format char

14 years ago | 0

Answered
Have I understood something wrong when using "If Statement -block and If Action Subsystem -block in Simulink code?
When Subsystem 1 is enabled, the output of subsystem 2 will maintained until subsystem will be enabled. That means if the output...

14 years ago | 0

Answered
vector with floating point values
Yes you can fid=fopen('filename.txt','w') A=1.2345678 B=2.30000004 C=3.42451478 X=[A B C] fprintf(fid,'%12.5f %12.5f %...

14 years ago | 0

Answered
Choose some data that has a minimum value
x=[4 1 3 8 2 0 10] a=sort(x); % sort x in ascending order min_value=a(1:3) % choose the 3 first lowest numbers

14 years ago | 0

| accepted

Answered
Embedded program not working for some values of simulation time steps from digital clock..?
Maybe, there is a problem with the precision. Try to use a tolerence tol=10^(-6); if abs(T-q)<tol

14 years ago | 0

Answered
The system of equations (64 equations -12 unknown) solution help
% Look at this example n1=i1*i5*i4 n2=i2*i5*i3 n3=i1*i5*i2 n4=i1*i4*i3 ---------------------- ...

14 years ago | 0

Load more