Answered
How to check divisibility?
a=3; b=2; out=~rem(a,b)*a/b

14 years ago | 4

| accepted

Answered
matlab to exe ""input function not work""
Use *inputdlg* function

14 years ago | 0

| accepted

Answered
Change all parameter of same subsystem in simulink???
Use add_block and set_param, look at this answer <http://www.mathworks.com/matlabcentral/answers/58250-generation-of-a-simuli...

14 years ago | 1

Answered
How to run simulink through dSPACE(DS1104) without control desk?
Try to build your model, then set your system target file to *rti1104*, and click on connect to target, then start simulation. ...

14 years ago | 0

Answered
intercept of secondary axis
Try this close; x=0:250; y1=100*abs(sin(0.01*x)), y2=10*cos(.04*x); [ax,h1,h2]=plotyy(x,y1,x,y2,'plot'); yt=get(a...

14 years ago | 0

Answered
intercept of secondary axis
After plotyy add this: yt=get(gca, 'ytick'); yt(1)=[]; set(gca,'ytick',yt)

14 years ago | 0

| accepted

Answered
How to convert from symbol to double?
Use suyms x f=cos(x); x=10; eval(f)

14 years ago | 0

Answered
is it possible to generate multithread code from simulink model?
In simulink you can run several blocks in parallel, that means you can do what you are asking. In real time, that will depen...

14 years ago | 0

Answered
Can I import many different xls files at once?
d=struct2cell(dir('yourfolder/*.xls')) file=d(1,:) for k=1:numel(file) res{k}=xlseread(file{k}); r_mean{k}=mean(re...

14 years ago | 0

| accepted

Answered
How to vectorize this code to eliminate nested For loops
x=[1 3 4 10 20 30]; X=cell2mat(arrayfun(@(y) y-x,x','un',0)) %or X=bsxfun(@minus,repmat(x',1,numel(x)),x)

14 years ago | 0

Answered
Using sendmail how can I send the value that are stored in the workspaces explain me with an example
If you you have one matrix you can send your matrix as a text message a=rand(4) message=cellstr(num2str(a)) sendmail({his...

14 years ago | 0

Answered
how can I check to see if two different matricies contain any of the same numbers?
any(ismember(B,A))

14 years ago | 3

| accepted

Answered
remove unused callbacks from GUI m files
All unused callback functions can be removed

14 years ago | 0

Answered
trying to implement nonlinear ODE equation
The third equation will be dz(3) = (-K*F)*y(2)/sqrt(y(1)^2+y(2)^2) with dz = zeros(3,1);

14 years ago | 1

| accepted

Answered
How to assign different sample times for a sinusoidal signal in simulink?
You can use a zoh block combined with a switch block

14 years ago | 1

| accepted

Answered
plot a graph with x-axis on top and y-axis on the left side
t=0:0.1:10; y=sin(t); plot(t,y) set(gca,'XAxisLocation','top','YAxisLocation','left','ydir','reverse');

14 years ago | 11

| accepted

Answered
Sum of two signal which have differents data rate
You can interpolate the two signals

14 years ago | 0

Answered
how to display all values
Use two constant blocks and set values to w and s

14 years ago | 0

| accepted

Answered
(n start with 0) An=A0+A1+ A2+A3+…+ An-1+An process??
An=@(n) cos(n) % example for cos(n) out=sum(arrayfun(@(x) An(x),0:n))

14 years ago | 0

Answered
How to find maximum value of function and return x in simulink
You can use Matlab function block with the code: function y = fcn(u) %#codegen persistent k up test if isempty(k) k...

14 years ago | 0

Answered
How can i import an array into an embedded MATLAB function in simulink not as a signal?
Use a *constant* block, and set i's value for example to *c_val*; before running your simulink model, in matlab command, just l...

14 years ago | 1

| accepted

Answered
how can i get output
x= [43 3 0 10] y=[] for k=1:numel(x) y=[y num2str(x(k))]; end y=str2num(y); %or y=str2num(cell2mat(arrayfun...

14 years ago | 0

Answered
removing cells that satisfy a specific condtion
for k=1:numel(A) % A is you cell array try a=inv(A{k}'*A{k}) out{k}=A{k} % out is the result ...

14 years ago | 0

Answered
Using GUIDE to Create checkboxes and save values to an Array
If you want to see the value of Subject in workspace add assignin('base','Subject',Subject)

14 years ago | 2

Answered
How to find maximum value of function and return x in simulink
You can calculate (using unit delay or memory and sum block) out(n)-out(n-1), when it becomes negative, it's your first maximum...

14 years ago | 0

Answered
Deleting sepecific character from cell array
% in this example we rmove '00' and '123' A={'123' '1234' '12345' '11' '00'}; idx=cellfun(@(x) isequal(x,'00') | isequal(x...

14 years ago | 3

Answered
which block to use for feedback loop in simulink
Both *Unit delay* and *Memory* blocks work fine.

14 years ago | 0

Answered
How can I create an array in Stateflow in the form Arr= [x y z]?
You can use P=[P1 P2 P3 P4 P5 P6 P7 P8 P9 P10]. % |P=(P1 P2 P3 P4 P5 P6 P7 P8 P9 P10)| is not valid Or you can u...

14 years ago | 2

Load more