Answered
Give space after 3 digit
a='123456789' a=reshape(a,3,[]); a=[a;blanks(size(a,2))] a=a(:)' %or more general b='1234567' n=numel(b) m=ceil...

13 years ago | 0

| accepted

Answered
How to find numbers in one vector but not in the other vector?
value=setdiff(a,b) If you want values and index [value,idx]=setdiff(a,b)

13 years ago | 0

Answered
Concatenate more than 2 mat files?
You can load all your mat-files then concatenate whatever you want

13 years ago | 0

Answered
manibulation of 3d matrix
A(:,:,1)=[1 2 3;4 5 6;7 8 9] B(:,:,1)=[10 20 30 ;40 50 60;70 80 90] [n,m]=size(A(:,:,1)) C=zeros(2*n,m) C(1:2:end)=A(:,:,1...

13 years ago | 0

| accepted

Answered
Place values in a matrix according to indices
ii=repmat((1:size(nnlist,1))',1,size(nnlist,2)) idx=sub2ind(size(w),ii,nnlist) w(idx)=1/m

13 years ago | 0

| accepted

Answered
Problems with Nested functions
Check if ExampleData.mat is in your current folder dir ExampleData.mat

13 years ago | 0

Answered
Non-linear equation roots
You can use <http://www.mathworks.com/help/matlab/ref/fzero.html fzero> with starting interval w=0.5; f=@(k) 2*k/log((1+k)...

13 years ago | 0

Answered
System of differential equations
Main program y0=[0 1]; tspan=[0 10]; [t,y]=ode45(@myeq,tspan,y0) save this function as myeq.m function dx=myeq(t...

13 years ago | 0

| accepted

Answered
How can I make an executable file based on my m-files?
Look at this <http://www.mathworks.com/videos/getting-started-with-matlab-compiler-68744.html tutorial>

13 years ago | 0

Answered
Non-linear equation roots
w=0.5 syms k result=double(solve(w==2*k/log((1+k)/(1-k)),'k'))

13 years ago | 0

Answered
I am getting error while accessing data from cell and storing it in matrix..can anyone help?
Clear your variable then try again clear coordinates

13 years ago | 0

Answered
I have {1*1} cell which contains a column matrix with 4455 rows how can i access data in each row?
A{1}{k} Example A={{10 20 30 40}} A{1}{3} % The result is 30

13 years ago | 1

| accepted

Answered
Attempt to reference field of non-structure array.
What is IntegralImages.ii? this causes the error

13 years ago | 0

Answered
how to automatically save the workspace data in programs containing loops
You can use <http://www.mathworks.com/help/matlab/ref/save.html save> function to save your variables in a mat-file

13 years ago | 0

Answered
What are the advantages of using *.slx over *.mdl?
<http://blog.developpez.com/matlab/p11469/simulink-2/nouveau-format-slx-pour-les-modeles-simulink>

13 years ago | 1

Answered
Finding the position of a row vector in an array
[idx,idx]=ismember(A,[1 0 1 1 0],'rows') A(logical(idx),:)=[1 1 1 1 1]

13 years ago | 0

| accepted

Answered
How change values in n number of matrix?
Instead of working with A,B,C, you should work like below A=rand(5); B=rand(5); C=rand(5) YourArray={A,B,C} YourArray{1...

13 years ago | 0

Answered
create Low Pass filter Code
<http://www.mathworks.com/help/dsp/examples/designing-low-pass-fir-filters.html Designing Low Pass FIR Filters>

13 years ago | 0

| accepted

Answered
Minimizing the use of intermediate variables in functions
Use size(array,2)

13 years ago | 0

| accepted

Answered
how can I write all for loop outputs in single matrix?
For vertical concatenation A=[1 2 3;4 5 6;7 8 9] B=[10 20 30;40 50 60] out=[A;B]

13 years ago | 0

Answered
how to give ylabel desired label automatically in loop subplots???
figure for i=1:6 subplot(6,1,i) plot (sin(1:100)*10^(i-1)) y_titre=sprintf('c%d',i) ylabel(y_titre,'F...

13 years ago | 1

| accepted

Answered
Error in my code
%Dc is (9,2), which means that your system has 2 inputs ans 9 outputs the input u should be (100,2) and t (100,1)

13 years ago | 1

| accepted

Answered
how do i pass variables from one gui to another?
<http://blogs.mathworks.com/videos/2005/10/03/guide-video-part-two/>

13 years ago | 0

Answered
How to give inputs to function definitions?
In Matlab windows command type costMat=magic(5) [assignment,cost] = munkres(costMat)

13 years ago | 0

| accepted

Answered
how can I cancel repeated results?
M = [1 1 1; 1 1 -1; 1 -1 1; 1 -1 -1; -1 1 1; -1 1 -1; -1 -1 1; -1 -1 -1]; rowM=zeros(1,3); vector=[1 0 1] for p=1:size(M,1)...

13 years ago | 0

Answered
how can I cancel repeated results?
If s ={{-2 2 -1},{-2 -2 1},{-2 2 -1},{0 0 3},{0 0 -3},{0 0 3},{0 0 -3}} Then out=unique(cell2mat(cellfun(@cell2mat,...

13 years ago | 0

Answered
Adding rows to a matrix after every even row
A = [6;2;2;1;1;0] B=[reshape(A,2,[]);nan(1,numel(A)/2)]; B=B(:)

13 years ago | 2

| accepted

Answered
do not display value on the axis
Maybe the order is not good plot(1:3,1:3) set(gca,'xtick',[])

13 years ago | 6

| accepted

Answered
I have a matrix which size is mx1, I wanna give number for each value in a row starting 1 and ends m.
Do you mean k=5 assignin('base',sprintf('value_%d',k),k*0.1)

13 years ago | 0

Load more