Answered
Global symbolic variable definition
In windows command you should declare *a* as a sym global syms a global a

14 years ago | 1

Answered
How can i choose certain rows from a matrix?
A=rand(10000,3) out=A(10:10:10000,:)

14 years ago | 0

| accepted

Answered
Plz any one can put the idea how to convert an jpeg or tiff image to .mat file
im=imread('yourimage') save fic im % saved in fic.mat

14 years ago | 0

Answered
Can ODE45 solve this equation?
When you write |x1=x and x2=dx/dt| you will have a DE system which can be resolved as function dx=fcn(t,x,tp,b) dx=z...

14 years ago | 0

Answered
get char between two specified characters
p='[Hello\]' s={'[Hello]','(Hello)','[Hello]erz'} r=regexp(s,p,'match') r=r(cellfun(@(x) ~isempty(x),r)) out=cellfun(@(x) ...

14 years ago | 0

| accepted

Answered
Simulink: return values of simulation
In your <http://www.mathworks.com/help/simulink/slref/scope.html scope>, click on parameter icone, then History, then check *sav...

14 years ago | 0

| accepted

Answered
How to use the If function to find and replace symbols in an equation?
syms A1 A2 A3 A1_ A2_ A3_ a=A1*A1_+A2*A2_+A3*A3_+A1*A2+A2*A3 a=char(a) a=regexprep(a,{'A1**A1_','A2**A2_','A3**A3_'},'0') ...

14 years ago | 1

Answered
How to freeze a figure
set(handles.yourobject,'enable','off')

14 years ago | 0

| accepted

Answered
How to subtract vectors with different number of entries?
a=[1970 254.5 1980 264.5 1990 234.5 2000 234.7] b=[1970 234.5 1980 234.6 2000 456.7 2010 234.7] idx=find(a...

14 years ago | 1

Answered
How to run a periodic custom signal in simulink
You can use a repeated sequences block

14 years ago | 0

Answered
content of two Images into one image
if your images are called picA1,picA2,...picAn in folder A, and picB1,... in folder B for k=1:100 im1=imread(['folderA...

14 years ago | 0

Answered
how to convert the pixel values of the image in the range of (0-255) into (0-1)?
im1=imread('yourfile'); b=linspace(0,1,255); im2=arrayfun(@(x) b(x+1),im1)

14 years ago | 0

Answered
How to enter this kind of state space equation into mat lab X ̇=AX+BQ+EU; Y=CX+DQ+FU
Your model can be written as dX=AX+NewB.NewU % NewB=[B E] and New_U=[Q;U] Y=C.X+NewD.NewU % NewD=[D F]

14 years ago | 1

Answered
How to compare two arrays?
cc=nan(1,numel(aa)) idx=find(aa==-1) cc(idx)=bb(idx)

14 years ago | 1

Answered
Best way to find a count in a range of numbers
index=data<lowerbound | data>upperbound; data(index)=[];

14 years ago | 0

| accepted

Answered
Can MATLAB easily solve a system of polynomial equations?
If x is the unknown variable v=[A B C -R] roots(v) Do this to all your equations, then find the intersection

14 years ago | 0

| accepted

Answered
how should i implement equation in simulink ?
You can use a N sin wave block from simulink/sources ans sum block from simulink/Maths with N inputs

14 years ago | 0

Answered
concatenation by exchange between two matrices
c =[0 0 1 1 0 0 1 1 0 0 1 1]; d =[0 1 1 0 0 1 1 0 0 1 1 0]; n=numel(c) m=numel(d) if n>m d(end+1:n)=nan elseif n<...

14 years ago | 0

| accepted

Answered
concatenation by exchange between two matrices
Do you mean x=[c d] If not, tell what is th expected output

14 years ago | 0

Answered
Excel File altering and saving
use <http://www.mathworks.com/help/matlab/ref/copyfile.html copyfile>

14 years ago | 0

Answered
how to replace characters into digits
clear s='ACGT' e=['11';'00';'01';'10'] in='AGCTAG' % Your initial data out=in for k=1:numel(s) out=regexprep(ou...

14 years ago | 2

| accepted

Answered
How do I save Simlulink model to JPG or any other image formats?
Manually, # Open your model # click on edit # copy model to clipboard # in paint past your image

14 years ago | 7

| accepted

Answered
how to have character replacement
A='11000100' s='ACGT' f=['11';'00';'01';'10'] b=reshape(A,2,[])' for k=1:numel(s) idx=find(ismember(b,f(k,:),'rows...

14 years ago | 1

| accepted

Answered
save a cell matrix as csv format
csvwrite does not accept cell arrays

14 years ago | 0

Answered
how to combine matrixes
General case a=[10 20 30 40 50 60]; b=[11 22 33 44 55 66]; r=randi(numel(a)); id=r-mod(numel(a),r); if id~...

14 years ago | 0

Answered
how to combine matrixes
a=[10 20 30 40 50 60] b=[11 22 33 44 55 66] r=2 out=[reshape(a,r,[]);reshape(b,r,[])] out=out(:)'

14 years ago | 0

| accepted

Answered
Subtraction of 2 plots with negative and positive values at different points.
A=[1 2 -3 -4] B=[10 -20 30 -40] idx=sign(A.*B) out=A-B.*idx

14 years ago | 1

| accepted

Answered
How can I create an uitable with one column as strings and second column as checkboxes?
f = figure('Position',[100 100 400 150]); names={'name1';'name2';'name3'} checkbox1={false;false;false} yourdata =[names ch...

14 years ago | 4

| accepted

Answered
How to write a for and while loop for sqrt(i)
help while help for

14 years ago | 1

Answered
How do I save the outputs from my 'while loop' into a vector?
f=inline('x^3+1/x^2+4*sqrt(x)-10') x0=input('Input your first guess: ') relErr=1; *m=[ ];* *relErr=[ ];* while ...

14 years ago | 0

Load more