Answered
Creating an empty sym variable?
x=sym([])

14 years ago | 0

| accepted

Answered
Change Column Names in Excel to Text
y= {'California' 'Texas' 'Florida' [123] [333 ] [234] [222 ] [567] [123] [234] ...

14 years ago | 0

| accepted

Answered
Speed up the conversion of array of cells in numbers
a={'1 2 3','4 5 6','7 8 10'} out=str2num(char(a))

14 years ago | 1

Answered
How to draw x=2 line using plot command
plot([2 2], [0 10]) %or maybe you want plot([2 2],ylim)

14 years ago | 0

| accepted

Answered
how can i create a new Matrix
pas=0.025 n=766525 A=(0:pas:(n-1)*0.025)' %or linspace(0,(n-1)*pas,n)'

14 years ago | 0

| accepted

Answered
How to plot the dervative of a curve
For example X=0:0.1:10 % Your x-axis Y=sin(X) % Your strain signal dY=diff(Y)./diff(X) plot(X,Y) % Your origi...

14 years ago | 0

Answered
is it possible to convert second or higher order differential equation in s domain i.e. transfer function. directly how?
Example *Edit* 5*d3y-4d2y+10y=20*du+4u The coefficients of your equation are D=[5 0 -4 10] N=[20 4] % Your t...

14 years ago | 2

| accepted

Answered
deleting multiple rows in a matrix
A(1:113475)=[]

14 years ago | 2

Answered
how find ramp response
You can use lsim function for any input t=0:0.1:10 alpha=2 ramp=alpha*t % Your input signal model=tf(1,[1 20 3])...

14 years ago | 13

Answered
Given a cell array, find the longest string
a={'Pete' 'Townshend1' 'Simmons' 'Steve' 'Sinatra' 'Idaho' 'Sweatshirt'} val=cellfun(@(x) numel(x),a) out=a(val==max(val))...

14 years ago | 3

| accepted

Answered
Is there a command to do the opposite to "load"?
Instead of load filename Use data=load('filename') % the only variable loaded is a struct variable data If your ...

14 years ago | 2

Answered
integration in embedded function
You can use an *Integrator* block.

14 years ago | 0

Answered
Mean of Cells of Cells
Yourcell={rand(16,107),rand(16,47),rand(16,147)} out=cellfun(@(x) nanmean(x(:)),Yourcell,'un',0) %or Yourcell={ra...

14 years ago | 0

Answered
How can I enlarge the legend box-size?
set(hleg1,'position',[0 0 0.2 0.2]) In general set(hleg1,'position',[x0 y0 width height])

14 years ago | 3

Answered
how to add noise to my data
Example t=0:0.1:100 y=sin(0.1*t) % Your signal yd=y+rand(1,numel(y)).*y/100 % diturbed signal plo...

14 years ago | 2

Answered
Am I correct in my approach regarding interpolation?
v=cell2mat(A) xi = datenum(D, 'mm/yyyy'); z = interp1(xi(3:4),v(3:4),xi,'spline');

14 years ago | 0

Answered
How do I get random numbers from a Simulink Coder executable?
You create a mat file fic_seed.mat seedv=1:300 save fic_seed seedv In *model properties-callbacks-Init Fcn* write th...

14 years ago | 0

Answered
How can I shift Right which is an array of numbers?
use circshift function circshift(aa,[0 -1]) or circshift(aa,[0 1])

14 years ago | 1

| accepted

Answered
find the location of minimum value
*Edit* A=rand(4,4,4,4) [ii1,ii2,ii3,ii4]=size(A) count=0 id=zeros(ii3*ii4,4); for k=1:ii3 for p=1:ii4 count...

14 years ago | 0

| accepted

Answered
Images of Simulink blocks
Click on *Edit-copy model to clipboard* Open *paint* for example then click on *past*

14 years ago | 0

Answered
how can i make a storage in simulation for matrix ?
z=[]; for i=1:k samples=ssvs(e,y,q,m,k); z=[z samples ]; end

14 years ago | 0

| accepted

Answered
how to assign characters?
data.a='u'; data.b='w' x=input('input','s'); s=data.(x)

14 years ago | 0

| accepted

Answered
how can i store matrix inside simulation to get bigger matrix ?
z=[]; %first result A=rand(5,4); z=[z;A]; %second result A=rand(5,4); z=[z;A] % and so on

14 years ago | 0

Answered
Editing ylim for multiple axes when using handles?
set(AX(1),'ylim',[0 10]) set(AX(2),'ylim',[1 100])

14 years ago | 1

Answered
Help switch case problem
gender=input('Enter the gender (F/f or M/m):','s'); Height=100 switch(gender) case {'F', 'f'} IBW = 45.5 + 2....

14 years ago | 0

Answered
How to create a function in the editor, then evaluate the function and plot the function.
f(3) to plot f=@(x)x^3 + 2*x^2 - x a=-10; b=10; fplot(f,[a,b])

14 years ago | 0

Answered
calling a GUI function inside a IF statement
Use if isequal(passx ,[0; 0; 0; 0]) Post the function that causes an error and how did you call it?

14 years ago | 0

Answered
another quick question about string read
sprintf('modelsq_%d', gesNum);

14 years ago | 1

Answered
extract from different .mat file to plot
% all your mat-files starting with abc f=dir('abc*.mat') filename={f.name} % all your mat-files starting with abc ...

14 years ago | 0

Answered
find the minimum value of x that corresponds to maximum value of theta
[~,idx]=max(theta) out=x(idx)

14 years ago | 0

| accepted

Load more