Answered
plot symbols of different size with respect to values
You can use <http://www.mathworks.com/help/matlab/ref/scatter.html scatter> command

14 years ago | 0

Answered
loading a 2d matrix from a text file comes in as an array
If its loading as a single array, depending on the order of your data you can For example: x y 1 10 2 20 3 30 If the...

14 years ago | 0

Answered
Logical vector based on matrix rows
out=ismember(A(:,2:end),[1 2],'rows')'

14 years ago | 1

| accepted

Answered
solving an equation using linsolve...............
I am not sure what you mean by manually: q=rcond(s)

14 years ago | 0

Answered
the error about application.
You are using a reccursive function. It seems that your code do not exit your function

14 years ago | 0

Answered
defining variable in matlab
You have not to define it in Matlab. You can pre-allocate a=0 %or for a vector a=zeros(10,1) % or for a matrix ...

14 years ago | 0

Answered
iteration based on a specified number of digits
for k=1:150 s=fix(log10(k)) % or s=numel(num2str(k))-1 a=sprintf('000%d',k) a(1:s)=[] out{k}=a; ...

14 years ago | 0

| accepted

Answered
calculating time difference from two string dates
date1=datenum(1993,5,1) date2=datenum(1993,7,1) v=datestr(datenum(date1:date2)) n=numel(v) %number of days

14 years ago | 0

Answered
How to obtain values symbolically
*EDIT* c=sym('c',[1 10]) x=sym('x') f=@(x,n)sum(c(1:n).*x.^(1:n)) f(x,5)

14 years ago | 0

Answered
How to replace values less than zero in a cell array with NaN?
% for all columns B=cell2mat(A) B(B<0)=nan A=num2cell(B) %if column 2 for e.g B=cell2mat(A) B(B(:,2)<0,2)=nan A...

14 years ago | 5

| accepted

Answered
Finding maximum y value corresponding to same x values.
[a,b]=unique(x); for jj=1:numel(a); e(jj)=max(y(x==a(jj))); end result=[a e]

14 years ago | 0

Answered
Embedded Functions and Visual Studio
If you have installed Visulio Studio, in Matlab windows command type mex -setup You will get a message that ask you to c...

14 years ago | 0

Answered
Delete columns of matrices in a cell array
A={rand(3) rand(3) rand(3)} cellfun(@(x) x(:,[1 3]),A,'un',0)

14 years ago | 0

Answered
Finding all possible row combinations of a matrix that add to zero
Try this A = [-1 0 0 ;1 0 0; 1 -1 0 ; 0 1 -1 ; 0 1 -1; 0 0 1]; n=size(A,1) idx1=npermutek([0 -1 1],n); p=size(idx1,1); ...

14 years ago | 0

Answered
Finding all possible row combinations of a matrix that add to zero
Ok try this *Edit* A = [-1 0 0 ;1 0 0; 1 -1 0 ; 0 1 -1 ; 0 1 -1; 0 0 1]; n=size(A,1) idx1=npermutek([0 -1 1],n); p=s...

14 years ago | 0

Answered
Finding all possible row combinations of a matrix that add to zero
*Edit2* A = [-1 0 0 ; 1 0 0 ; 1 -1 0 ; 0 1 -1 ; 0 1 -1; 0 0 1]; n=size(A,1); idx=logical(npermutek([0 1],n)); p=size(idx...

14 years ago | 0

| accepted

Answered
How to create own stimulus to drive simulink blocks ?
Example: t1=0:0.1:10 y1=sin(t) t2=10.1:0.1:20 y2=cos(t)./t t=[t1 t2]; y=[y1 y2]; ty=[t;y]; save yourfile ty...

14 years ago | 1

Answered
Does fft() always require 2^n sample points?
No. any number of samples. Just try it. The algorithm needs 2*n samples to have even samples and odd samples. If you have odd nu...

14 years ago | 0

| accepted

Answered
Is it possible to create a GUI table with number of rows and columns specified by the user?
ask the user to enter nline and ncolumn nline=10; ncolumn=8: set(handles.uitable1,'data',cell(nline,ncolumn))

14 years ago | 1

| accepted

Answered
Simulate subblocks of a Simulink Model
Copy your subsystem in a new file, then lunch simulation.

14 years ago | 1

Answered
Subtracting two matrices of different size element by element
% ----------your data------- x=magic(4); y=magic(2); %-----------The code----------- [n,m]=size(x); [n1,m1]=size(y); ...

14 years ago | 0

| accepted

Answered
How to editt the properties of Scope block in simulink?
Open your <http://www.mathworks.com/help/simulink/slref/scope.html scope>, click on the parameters icon, Then change the number ...

14 years ago | 0

Answered
how to save data in for loop?
m{end+1}=sprintf('%04d%s', year, Month{month});

14 years ago | 1

| accepted

Answered
repeat large number of vector elements
v=[0 1 2]; c=[3,2,4]; out=cell2mat(arrayfun(@(x) repmat(v(x),1,c(x)),1:numel(v),'un',0)) *EDIT* i1=0; out=zeros(1,s...

14 years ago | 0

Answered
Working with structures and combining them
Let us guess, Maybe you want something like this data1=struct('data',num2cell(1:10)) data2=struct('data',num2cell(11:20)) ...

14 years ago | 0

Answered
About CAT arguments dimension are not consistent
If x is a column vector, you can t make an horizontal concatenation. Maybe you should do x=[x;0]

14 years ago | 0

| accepted

Answered
plotting within a for loop
for k=1:365 h=plot(X(k,:),Y(k,:)) hgsave(h,'sprintf('fig%d',k)) close end To load your plots use hgload('figurena...

14 years ago | 1

| accepted

Answered
row vector with 15 elements
linspace(7,40,15)

14 years ago | 0

| accepted

Answered
How can i use matlab with embedded system?
You will need interface card that will communicate between Matlab and your application, you will also need some toolbox like dat...

14 years ago | 1

| accepted

Answered
vector into matrix form
Unless you want: out=A(1:365,1:24)

14 years ago | 0

Load more