Answered
How can I use odeset and some variable parameters within ode45?
[t,c] = ode45(@(t,c) reaction(t,c,s,q,w),tspan,c0,options);

13 years ago | 1

| accepted

Answered
Matlab. Find the indices of a cell array of strings with characters all contained in a given string (without repetition)
str = 'actaz'; dic = {'aaccttzz', 'ac', 'zt', 'ctu', 'bdu', 'zac', 'zaz'}; idx1=find(cellfun(@numel,dic)<=numel(str)) dic1=...

13 years ago | 0

| accepted

Answered
How do I Change the Dialog Box Output
A = inputdlg({'T1','T2','T3','T4', 'T5', 'T6'}, 'Input', [1 7; 1 7;1 7; 1 7; 1 7; 1 7], {'0', '0','0', '0','0', '0', '0'}) in...

13 years ago | 0

| accepted

Answered
Regular Expressions using regexp
a={'-2.4,-3';'2,3';'0,5';'-4,-2.5';'A';'V';'C'} out=a(cellfun(@(x) ~isempty(strfind(x,',')),a))

13 years ago | 1

| accepted

Answered
latitude, longitude and height plot?
You can't use surf, use plot3(lat,long,height)

13 years ago | 1

Answered
Help with for loop - How do I use indices to denote intervals?
*Edit* n=size(B,1); for k=1:n; ii=B(k,1) jj=B(k,2) A(ii:jj,:)=0; end

13 years ago | 1

| accepted

Answered
How to create a table?
f=figure headers={'A','B','C'} data=[1 2 3;4 5 6;7 8 9] h = uitable(f,'Data',data, 'ColumnName',headers); For more d...

13 years ago | 0

Answered
How can I plot a new vector that have a relative length of another?
You can write p3=p1+0.3*p2

13 years ago | 0

| accepted

Answered
i cannot seem to enter :y=(a.^(4x)+a.^(-4x)-22)/(x^3)
y=(a.^(4*x)+a.^(-4*x)-22)./(x.^3)

13 years ago | 0

| accepted

Answered
convert an array to a new
c1=M(:,1) c2=M(:,2) n=max(c1); m=max(c2); idx=sub2ind([n m],c1,c2) out=zeros(n,m); out(idx)=M(:,3)

13 years ago | 0

| accepted

Answered
how to combine various image blocks into a single image
Concatenate your blocks. For example if your image is nxm array and was divided in two blocks old_image=[block11 block12 ;b...

13 years ago | 0

Answered
how to use sub2ind function?
To find the location of your pixel use the function *find*

13 years ago | 0

Answered
How can i pass variables from an m file from the function workspace to the base workspace
If your simulink model name is untitled, you can set the InitFcn of your model to mfile (mfile is the m-file that provide your 5...

13 years ago | 0

Answered
How to save 4 images in 4 sub folders in the directory
file1=fullfile(sub_folder1,filename1) imwrite(im1,file1) % Do the same for the other files

13 years ago | 0

Answered
Add 3 to just the odd-index elements
x = [2 5 1 6] x(1:2:end)= x(1:2:end) + 3

13 years ago | 9

| accepted

Answered
How do I create a vector of the average of consecutive elements of another vector (without using a loop)?
A=[2 4 6 8 10] B=mean([A(1:end-1);A(2:end)])

13 years ago | 6

| accepted

Answered
In Matlab 2013a, I cannot find a menu that was in Matlab 2012a
The menu changes since Matlab 2012b

13 years ago | 0

Answered
Specify max limit to data from data file
x = D(1:N,1); y = D(1:N,2);

13 years ago | 0

| accepted

Answered
Can MATLAB create a column of words based on integer values in another column?
Sub_ID = [2; 3; 3; 9; 2; 6; 23; 23; 23; 42; 100; 8; 42; 43; 43; 8]; for k=1:numel(Sub_ID) out{k,1}=sprintf('Sub_ID%d',...

13 years ago | 0

| accepted

Answered
Creating a column vector by multiplying the n-1 element by the corresponding element in another vector
F=[2;3;4;5;6] n=numel(F) M=zeros(n,1); M(1)=1; for k=2:n M(k)=M(k-1)*F(k); end disp(M)

13 years ago | 0

Answered
how to import time/date from excel to matlab and make it comparable as a data?
Use |xlsread| to import your data from Excell file, then use functions like |datenum| , |datestr| to manipulate your date data

13 years ago | 0

Answered
Matrix with differential operators - HELP
%Example syms x y f=@(h) [diff(h,y) diff(h,x);diff(h,x) -diff(h,y)] h=2*x+3*y f(h)

13 years ago | 0

Answered
How do I associate specific values to specific verbiage?
A = [1; 2; 3; 1; 2; 3] v={'Lost'; 'Found'; 'Unk'} B=v(A)

13 years ago | 0

| accepted

Answered
Form File error: time values must be monotonically non-decreasing
Your matrix should be |2x146| The first row is time and the second is your signal

13 years ago | 1

| accepted

Answered
how can i create signals in simulink starting from vectors with time and values and how i can save multiple signals generated in simulink in in a mat file
If you want to save each signal in one mat file, use for each signal a <http://www.mathworks.com/help/simulink/slref/tofile.html...

13 years ago | 0

| accepted

Answered
Access data in a structure array using index
If you want to extract all S.x v={S.x} % to have |S(1).x(2)| v{1}(2)

13 years ago | 0

Answered
saving scope result as JPEG
plot(out(:,1)) hold on Plot(out(:,2)) hold off

13 years ago | 0

| accepted

Answered
circshift() one number ,in each iteration?
Maybe you want to save all the results clear A=[1 2 3;4 5 6;7 8 9] % Shift A(2,1) for k=1:size(A,2)-1 A(2,:)=circshift(...

13 years ago | 0

| accepted

Answered
wait for user input
pause

13 years ago | 8

Load more