Answered
How should I run a simulation in simulink so that the simulation matches the real time clock?
If you have a Real *time windows target* toolbox you can simulate on real time

14 years ago | 0

Answered
How to link a plot or continous data from M-file to Simulink Model
You can use from file or from workspace block Example t=0:0.1:10 y=sin(t) ty=[t' y'] then set the value of your *fr...

14 years ago | 1

Answered
how I can make both border and data of uitable to be the same size
t = uitable; set(t,'Data',ones(3)) set(t,'ColumnWidth',{100})

14 years ago | 0

| accepted

Answered
How to plot two complicated functions
You can use roots function to find the solutions of your equations, for example: for x=1 v=[1 0 0 0 -1 0 sin(x)+2*sqrt(x)] ...

14 years ago | 0

| accepted

Answered
my question is that
nm=[400,400] v=0.5; %variance m=2; % mean out=m+sqrt(v)*randn(nm)

14 years ago | 0

| accepted

Answered
How to assign a variable used in a simulink block parameters?
In matlab command type Nb_ser=yourvalue %or in m-file which you will run before your simulation

14 years ago | 0

| accepted

Answered
How to solve a system of non-linear differential equations
<http://www.mathworks.com/help/matlab/ref/ode45.html>

14 years ago | 2

Answered
CELLFUN syntax when calling the ATAN2 function for 3 x 3 rotation matrix decomposition
euly=cellfun(@(x) atan2(-x(3,1),sqrt(x(3,2)*x(3,2)+x(3,3)*x(3,3))),eulR);

14 years ago | 0

| accepted

Answered
is there a function in matlab that creates a binary repetition coder ?
s='0010110' out=repmat(s,3,1) out=out(:)' %or s=[0 0 1 0 1 1 0]; out=reshape(repmat(s,3,1),1,[])

14 years ago | 0

| accepted

Answered
Find the roots of the equation using MATLAB.
To solve x+cos(x)=0 write and save this function (myeq.m) function f=myeq(x) f=x+cos(x) then call in matlab com...

14 years ago | 0

Answered
how to solve the below non linear algebraic equation using matlab
save this function myeq function f=myeq(x) f=[1.5*cos(60) + 4.0*cos(x(1)) - 3.5* cos(x(2)) - 3.0 1.5 *sin(60) + 4....

14 years ago | 0

Answered
How to get max from Scope (Simulink)
If your signal is unknown, you can get the maximum at the end of simulation. If it's known, then the maximum is also known, and ...

14 years ago | 0

Answered
problem with the legend in my graph
Because you have six plots, the legend will correspond, in order, to the three first plot Look how to do it close G=0:0....

14 years ago | 0

| accepted

Answered
How can trigger a battery to discharge at a specific time in Simulink?
Use a *clock* block from *sources*.

14 years ago | 0

Answered
How to decrease the gap between figures in subplot
tailx=0.2 taily=0.4 marg=0.05 y1=0.55 y2=0.1 x0=0.02 v=zeros(8,4) v(1,:)=[x0 y1 tailx taily] for k=2:4 v(k,1)...

14 years ago | 1

| accepted

Answered
Drawing circuits in Simulink
You are using elements from different libraries, that can't be connected. The red line means that your blocks are not connected....

14 years ago | 2

Answered
Compilation don't work. Why?
Try mbuild -setup

14 years ago | 0

Answered
Find a PID Controller
Hp=tf (1, [1 0 1] ); [kpid,info] = pidtune(Hp,'pid') Then simulate your system using *tune* (in PID block) to find the des...

14 years ago | 0

| accepted

Answered
How to output this cellarray?
Time{1}

14 years ago | 0

Answered
Import data file with comma decimal point
fid = fopen('file.txt'); out=textscan(fid,'%s %s %s %s %s %s %s %s %s %s %s %s ') fclose(fid); Then you can ar...

14 years ago | 1

| accepted

Answered
Plotting Multiple y-axes with different range on the same plot
Adapt this to your plots close all % ------------------your 6 functions----------------------------------------- x=0:0.5:...

14 years ago | 0

Answered
Defining the function file for fsolve
Your function: replace x by x(1) and y by x(2) function F=nonlinearsolver(x) F=[x(2)-x(1)^2-3*x(1)-2; x(2)-2*x(1)-3]; ...

14 years ago | 0

Answered
How can I declare a char or cell variable using an identifier number?
n=2 sprintf('var%d',n)

14 years ago | 0

Answered
how to use circshiftfor each column of a matrix
out=[flipud(A(:,1)) A(:,2)]

14 years ago | 1

Answered
plot 2 curves with 'very close' y values
plot(t,y1,'or) hold on plot(t,y2,'-g')

14 years ago | 1

| accepted

Answered
how do I know that I have system identification toolbox?
In Matlab command type ver

14 years ago | 0

| accepted

Answered
how to select a text file from a directory and read it in GUI matlab
Instead of |fid = fopen('*.txt')| use ; file=fullfile(PathName,FileName) fid = fopen(file);

14 years ago | 1

| accepted

Answered
Is it possible to reduce code generation time for simulink Matlab function block?
Instead of *Matlab Fcn* block use *interpreted Matlab Fcn* block.

14 years ago | 1

| accepted

Answered
I am trying to calculate sensitivity indices, How ??
temp=[ 26 27 28 29 30 31 32 33] yield=[ 5500 6800 7700 7500 6800 6200 4500 4100] out=diff(yield)...

14 years ago | 0

Answered
What is the solution of differential equations ?
sol=dsolve('D2y + y = sin(x)','x')

14 years ago | 0

Load more