Answered
different sample times for variable-sized vectors
I did'nt exactly understand the problem, but I think with a *ZOH* block you can set different step size.

14 years ago | 0

Answered
To import data in Simulink
What do you mean by import to Simulink? Instead, tell us what do you want to do with these data. Because if you want to use thes...

14 years ago | 0

Answered
vectors to scalars with an Embedded Matlab Function
You can use a *Demux* block from *Simulink/Signal Routing*. At the output of Demux you will have 10 scalar at the same time. ...

14 years ago | 0

Answered
How can I convert a raw matrix into a sequence of digits?
You can use an Index Vector block with 8 input, the control input is a repeating sequence stair [0 1 2 3 4 5 6 7] block. If it's...

14 years ago | 1

| accepted

Answered
convert string to cell
b=regexp(a,';','split') b{:}

14 years ago | 0

| accepted

Answered
y = e^(-x^2)
x=0:0.1:10; y=exp(-x.^2); plot(x,y)

14 years ago | 8

| accepted

Answered
converting from cell 2 matrix
b=cell2mat(a)

14 years ago | 0

Answered
Definite Integrals in Simulink with a = last time step, b = current time step
<<http://azzimalikcom.ipage.com/ansf269.jpg>>

14 years ago | 0

| accepted

Answered
How can I make a decimal value of A multiplexed signal in Simulink?
If you have a *communication system* toolbox, use a *bit to integer converter* block If not use a *bin2dec* matlab function i...

14 years ago | 0

| accepted

Answered
Graph With Variable Number of Plots
hold on for B=1:8 M = [2 3].^B N = [2 4].*B plot(N,M,'k') end If you want to store the result it's better to use for e...

14 years ago | 1

| accepted

Answered
Using multiple functions in cellfun
HEX_DATA={'0ff';'0f0';'00f'} BIN_DATA = cellfun(@(x) dec2bin(hex2dec(x),8), HEX_DATA,'un',0)

14 years ago | 1

Answered
Input and output of PID controller
The PID controller don't see if its input is a position or a speed or anything else, its input is just a signal u, the PID will ...

14 years ago | 0

| accepted

Answered
option "Interpret vector parameter as 1-D" in Constant block
With the option *"Interpret vector parameter as 1-D"* |x=[1 2 3 4]| and |x=[1;2;3;4]| are considered as a line vector which m...

14 years ago | 4

| accepted

Answered
How do you display a certain string as static text on a GUI by code?
set(handles.text7, 'String', 'Pass') is correct , click on your static text object and check if the name of your tag is tex...

14 years ago | 0

Answered
swap letters 2 by 2 in a string.
s='abcdefg'; m=fix(numel(s)/2)*2 s(1:m)=reshape(flipud(reshape(s(1:m),2,[])),1,[])

14 years ago | 0

Answered
A function to draw a circle with only radius as parameter?
function cercle(r) x=-r:.01:r y=sqrt(r^2-x.^2) hold on; plot(x,y); plot(x,-y) call the function cercle(5)

14 years ago | 0

| accepted

Answered
save variables in matlab workspace
value=15; assignin('base','var',value) % |'var'| is your variable name

14 years ago | 0

| accepted

Answered
plotting graph in simulink
This is a plot of a step response of second order system, you can use step command in a for loop, varying the damping coefficien...

14 years ago | 0

| accepted

Answered
How to show the distance between two points?
n=size(points,1) x=points(:,[1 3]); y=points(:,[2 4]); hold on;arrayfun(@(t) plot(x(t,:),y(t,:)),1:n)

14 years ago | 0

Answered
Using data struct in Simulink Embedded Matlab function
What if you use these struct variables as globals

14 years ago | 0

Answered
UI get file or dirrectory
[file,folder]=uigetfile if you want to have a file name with its path fic=fullfile(folder,file)

14 years ago | 1

Answered
Simulink transfer function with sinusoidal parameters
The corresponding equation is |d^2y(t)/dt^2+k.dy(t)/dt+y(t)=x(t)| where * x(t) is the input of your system * y(t) is...

14 years ago | 3

| accepted

Answered
A= [2 3 4]; B=[2 3 4]; Output C=[22 33 44]; Merge 2 matrix elements
A=[11 22 33]; c=num2str(A') d=[c,c] B=str2num(d) B=B'

14 years ago | 0

Answered
Simulink transfer function with sinusoidal parameter
You can multiply your transfer function by sin(t) <<http://azzimalikcom.ipage.com/ansf266.jpg>>

14 years ago | 1

| accepted

Answered
Data Cursor ERROR in Matlab 2010
If you want to locate idex value of points in your plot, use plot(y) istead of plot(t,y)

14 years ago | 0

Answered
Definite integral in (embedded) Matlab function
If you don't need to run in real time, instead of embedded function, use Matlab function.

14 years ago | 0

Answered
Subscript indices must either be real positive integers or logicals?
The problem is in: t = -1/F:0.01*(1/F):1/F; Vr(t)= % t is a real number, can't be used as an index %use instead ...

14 years ago | 0

Answered
Solving a system of ODEs in MATLAB
function dy = diff_eqs(t,y) dy=zeros(2,1); R=100; k12=33; k21=33; V1=10; V2=25; k2=8; dy(1) = (R - k12*y(1) +...

14 years ago | 0

| accepted

Answered
Unit step and transfere function in Simulink will i need a gain box???
You don't need a gain block, even your numerator is different from 1.

14 years ago | 0

| accepted

Answered
Trying to plot a sine wave???
x=[0:0.1:10] freq=0.1 amp=5 gain=1.5 y=gain*amp*sin(2*pi*freq*x) plot(x,y)

14 years ago | 1

| accepted

Load more