Answered
Locating Libary blocks in a large model
<http://www.mathworks.com/help/simulink/ug/working-with-library-links.html#brknia1-1>

11 years ago | 0

Answered
problems while exporting figure.
h=bar(1:3,'facecolor','y','edgecolor','k','linewidth',1)

11 years ago | 0

Answered
How to Nonlinear Equation?
syms h x eq1=h^2*((4*x)/exp(x^2) - 1/2)+ (2*h*x)/(x^4 + 1), eq2=2*h*(4/exp(x^2) - (8*x^2)/exp(h^2)) sol=solve([eq1,eq2]) ...

11 years ago | 1

Answered
Export multiple figures in a directory
close all; x=(1:1:50); y=x.^2; z=x.^3; t=-10*z; aaa=[y; z; t]; for i=1:size(aaa,1); figure(i); plot(x,aaa(i,:)...

11 years ago | 0

| accepted

Answered
How to add multiple axes to a log-log plot?
Look at this example x1=0:0.01:5 x2=10*x1 y1=sin(x1) y2=2*cos(x2) plot(x1,y1,'r') hold on, ax2=axes('xaxislocation','...

11 years ago | 0

Answered
Problem of Interpolation in matlab
A=[0 0.5000 1.4700 1.2300 4.3700 3.2800 7.2900 5.2800] UM=A(:,1) angle=A(:,2) UM...

11 years ago | 0

| accepted

Answered
repeating numbers in matrix
col1=repmat(2:2:6,1,3) col2=reshape(repmat(1:2,6,1),1,[]) col3=5*ones(1,12) Read the documentation doc repmat doc r...

11 years ago | 0

| accepted

Answered
affect values to cells without a loop
a{1}=zeros(1,3); a{2}=zeros(1,4); ii{1}=1; ii{2}=3; b{1}=2; b{2}=3; out=cellfun(@(x,y,z) [x(1:y-1) z x(y+1:end)],a,ii,...

11 years ago | 0

Answered
plot double y axis, 3 curves
If your data are column vector [ax,h1,h2]=plotyy(x1,y1,x2,[y2 y3]) set(h1,'linestyle','none','marker','o','color','b'...

11 years ago | 0

| accepted

Answered
How to use use histc in multiple array
You can use a for loop

11 years ago | 0

Answered
Constraint condition and IF statement
Remove ceq= from your If expression a=(((0.025*(x(1)^2)*(1-exp((-1.025*x(3))/x(1))))/(((x(2)^2)/(x(1)+x(2)))*(1-exp((-0.513...

11 years ago | 0

Answered
I have code that uses ishift(Kr1')' What is the function of the single quotes?
This line ishift1(Kr1')' Can be written as a=Kr1' % Conjugate transpose of Kr1 b=ishift(a)' % transpose of ishift...

11 years ago | 1

| accepted

Answered
how to find strings of varying length within longer strings
str={'HA2.hdhashasdh' 'HA33.dskljdasjkdajkls' 'hh' 'HA80.djklasjdjklads' 'HA81.djkhadsh' 'HA245.fsaldjajdalsj' 'er'} li...

11 years ago | 0

| accepted

Answered
Deleting Duplicates from 2 data sets
data=unique([data_1;data_2],'rows')

11 years ago | 0

Answered
Find the roots of using matlab Help Please
Use <http://www.mathworks.com/help/matlab/ref/roots.html roots function>

11 years ago | 0

| accepted

Answered
Difference in simulation results of continuous and discrete transfer function in simulink
Check the poles of your discrete model, they are unstable while your continuous model is stable. That means the discretization ...

11 years ago | 0

| accepted

Answered
Matlab find an element in matrix
syms q x=[2*q q^2 5*q] [i,j] = find(x==q^2) The result is i = 1 j = 2

11 years ago | 2

| accepted

Answered
Saving data from a loop
data=xlsread('Soil Characterization.xlsx',5,'C17:K23'); L=length(data(1,:)); h=zeros(L,6) for xx=1:L; y=[data(1:6,xx)'...

11 years ago | 0

Answered
Building Simulink Modell from Matlab Code
get_param('path to block','DialogParameters')

11 years ago | 0

| accepted

Answered
How do I input a signal which is not a standard signal (like step or ramp) to a transfer function?
%Example H=tf(1,[1 2]) time=0:0.1:10 input_s=rand(1,numel(time)); output_s=lsim(H,input_s,time) plot(time,output_s)

11 years ago | 0

Answered
matrix column element limiting
Example A=rand(200,30) idx=A(:,29)>0.5 & A(:,30)<0.7 out=A(idx,:)

11 years ago | 0

| accepted

Answered
How to convert a multidimensional cell into a single array of only one column.
a={1 2 3;[] 4 5;6 [] 7} b=a' b=[b{:}] or b=cell2mat(reshape(a',1,[]))

11 years ago | 0

| accepted

Answered
Vectorizing Array -- Wrong Dimensions?
Probably, the value of setsize is 2252, or maybe in your code, you have pre-allocated the variable distance with zeros(2252,2252...

11 years ago | 0

Answered
Error using str2num (line 32), Requires string or character array input. Error in xGridMarkers = str2num(get(gca,'XTicklabel')); how to remove this error??
Use str2double, because get(gca,'XTicklabel') is a cell array xGridMarkers = str2double(get(gca,'XTicklabel')); yGridMarke...

11 years ago | 1

| accepted

Answered
I have 21*1 Matrix. i have store it into z. then i have to slice these value as 1*1 Matrix and allocate (z1, z2, z3, z4.......z21) for 21 matrix. how can i allocate. please tell me command or allocation.
I don't know why you need to create all these variables. z=rand(1,21) % Example for k=1:21 assignin('base',sprintf(...

11 years ago | 0

Answered
Round function with multiple inputs not working in MATLAB function block in Simulink
Instead of round(u,3) use round(u*1000)/1000

11 years ago | 7

| accepted

Answered
How to find matrix column & row max & min output as vector?
Read the documentation <http://www.mathworks.com/help/matlab/ref/min.html> <http://www.mathworks.com/help/matlab/ref/max.html>

11 years ago | 0

Answered
Cell Array Filtering Not Working
A=[1 34 2; 6 4 2; 9 1 0] B=num2cell(A) C=B([B{:,3}]==2,:) If you write B={A}, B is a 1x1 cell array. I think what you are...

11 years ago | 0

| accepted

Answered
repeat a vector with a pattern
v=[1 2] k=[1 7 9] out=cell2mat(arrayfun(@(x) v+2*x,k,'un',0)) or out=reshape(bsxfun(@plus,v',2*k),1,[])

11 years ago | 1

Load more