Answered
how to find a block containing NaN in cell
A={[1 nan 2] [1 3 5] [nan nan 7] [9 7 2]} out=cellfun(@(x) any(any(isnan(x))),A)

11 years ago | 0

| accepted

Answered
plotting the solutions of a differential system with numerical ways
start_time=0 final_time=10 in=[1 ;0]; %initials conditions [t,y] = ode45(@myfcn,[start_time final_time],in); plot(t,y) ...

11 years ago | 1

Answered
Replace the element in the cell array with space inbetween
element = {'num riqu' ; 'num riqu' ; 'con tant' ; 'con tant'} element=strrep(element,'num riqu','numeric'); element=strrep(e...

11 years ago | 2

Answered
I imported two columns of data from a txt file but it came in as one column who can i split them up
a=[1;2;4;6;5;1;2;7;8;10] idx=rem(a,2)==1 a1=a(idx) a2=a(~idx)

11 years ago | 0

| accepted

Answered
how can i get extra data on graph
You can use interp1 function x=[10,12,14,16,18] y=[0.6,0.9,1,0.2,1.28] xi=20 yi=interp1(x,y,xi,'linear','extrap')

11 years ago | 0

| accepted

Answered
what does this mean ?
Your function is doing this A(end-n+1:end,1:n)

11 years ago | 0

Answered
Solver and step size warning
Change the name of your simulink model, because there is another type of file, probably an m-file, named untitled.m

11 years ago | 0

Answered
How to plot two different curves on same axes?
plotyy(t,x1,t,x2)

11 years ago | 0

Answered
writing excel file for every iterations
clc clear clc A=xlsread('term.xlsx'); [p,q]=size(A); X=A(:,1); B = A(:,3); D=[]; for i= 1:200:2001 X(i)...

11 years ago | 0

Answered
reading particular rows from excel
[a,b,c]=xlsread('file','A200:Y200')

11 years ago | 0

| accepted

Answered
How to find index of maximum value/s of a matrix?
a=[2 3 1 5 6 4 0 5 2] [out,indices]=sort(a,'descend')

11 years ago | 0

| accepted

Answered
How do I generate exponential numbers from 0 to 1?
ii=sort(exp(randi([-10 0],10,1)))

11 years ago | 0

| accepted

Answered
how to assign variable for an array?
v=[1 2;3 4;4 6] % Example of 3x2 array

11 years ago | 0

| accepted

Answered
How can I power the elements of a 3D matrix to the elements of 2D matrix?
a=randi(10,4,3,2) b=randi(10,4,3) out=bsxfun(@power,a,b)

11 years ago | 1

| accepted

Answered
how do I subtract and then mean in every row of a data set?
v=rand(10,10); % Example out=mean(v(:,1:5),2)-mean(v(:,6:10),2)

11 years ago | 0

| accepted

Answered
Eliminate or merge the sequences
ind=find(diff([v(1)+1 v]))

11 years ago | 0

Answered
How to store and retrieve value in simulink
You can use <http://www.mathworks.com/help/simulink/slref/unitdelay.html unit delay block>

11 years ago | 0

| accepted

Answered
How do I force all contents in the cell array out of the command "xlsread" to be strings?
n={ 12 ,'1' ,4 ,nan, 45 } n(cellfun(@isnan,n))={''} out=cellfun(@num2str,n,'uni',0)

11 years ago | 0

Answered
omitting data from a cell array
n={ [1 2 5 6] ,[3 5.5 6.4 3 7.2] ,[2 13] ,15, [2 3.25 6.35] } out=n(cellfun(@numel,n)>=3)

11 years ago | 0

| accepted

Answered
How to augment a vector into another vector?
v1 = [0 1 2 3], v2 = [0 1 2] [a,b]=ndgrid(v1,v2) out=[a(:) b(:)]

11 years ago | 1

| accepted

Answered
I want to know the position of all the 1's in the matrix in form of rows and cols ??
A=[0 1 1 0;0 1 0 1] [jj,ii]=ind2sub(size(A'),find(A'==1)) out=[ii jj]

11 years ago | 0

| accepted

Answered
Creating variable In Maltab
You can use cell arrays. a=cell(4,5)

11 years ago | 0

Answered
How to combine three defined feature vector
out=[a;b;c]

11 years ago | 1

| accepted

Answered
How to open Scope in Simulink with Matlab command?
open_system('YourSimulinkModelName/ScopeName')

11 years ago | 3

| accepted

Answered
what's wrong here? plz help
That means that err is always bigger than 0.01.

11 years ago | 0

Answered
How can I pull or link a matrix output from m-file into simulink?
You can use <http://www.mathworks.com/help/simulink/slref/set_param.html?searchHighlight=set_param set_param> function

11 years ago | 0

| accepted

Answered
Connecting matlab output to simulink input. How to?
You can use a <http://www.mathworks.com/help/simulink/slref/matlabfunction.html Matlab function block>

11 years ago | 0

Answered
how to find correlation between the row values of a matrix?
D=[1 1 0 0 1;1 0 0 0 0;1 1 1 1 0;0 0 0 1 0;0 1 1 1 1] for k=1:size(D,1)-1 res{k}=sum(bsxfun(@eq,D(k+1:end,:),D(k,:))...

11 years ago | 1

| accepted

Answered
remove the rows of matrix?
m=[1 2;3 4;0 5;3 0;0 4;0 54;3 22] m(~m(:,1),:)=[]

11 years ago | 0

| accepted

Answered
calling simulink from simulation program
You can use the "to workspace" block or the "to file block"

11 years ago | 0

Load more