Answered
Add a number(specific column) to vector without deleteing it.
Another possibility: a=1:8; b=zeros(1,numel(a)+1); insert_position=2; b(insert_position)=2.5; b([1 insert_position+1:end])=...

7 years ago | 1

Answered
How to plot a cell array
plot([Behaviourcoded{:}])

7 years ago | 2

| accepted

Answered
Graphing two equations with different step values of x!
after first plot x=0:0.01:15; %and rest the same note square brackets are superfluous

7 years ago | 0

| accepted

Answered
generating random for j elemnts in matrix from set of data i have
EDITED I think you mean patient_condition=[0.05; 0.15; 0.25; 0.35; 0.45; 0.55; 0.65; 0.75; 0.85; 0.95]; test_type=[0.1 0.26 0...

7 years ago | 0

| accepted

Answered
How can I set multiple text descriptions' colours at one time
[tt(1).Color,tt(3).Color] = deal('r')

7 years ago | 0

| accepted

Answered
Error using ode45() to solve a couple of ODE's
dxdt=[G1.*(N0-a1.*X(1)-a2.*X(2)).*X(1)-k1.*X(1);... % ^------ should be a semic...

7 years ago | 0

| accepted

Answered
How to write sin=(1/2*x)?
Actually your graph looks alright just increase your domain interval syms x y=sin((1/2)*x) fplot(y,[0 6*pi]) % domain is fro...

7 years ago | 0

Answered
Numbers to scientific notation.
See Format

7 years ago | 0

| accepted

Answered
Solving symbols in a symbolic matrix
EDITED syms u3 u4 u5 u6 F1 F2 F7 F8 u =[0 0 u3 u4 u5 u6 0 0] F=[F1 F2 4 -2 0 -2 F7 F...

7 years ago | 0

| accepted

Answered
Plotting another Y vs Y with existing graph
yyaxis left %example plot(X_axis,Y_axis) yyaxis right scatter(left_Y_axis,right_Y_axis)

7 years ago | 0

Answered
How to create binary vector that can be applyied conditional case
A= [ 0.4, 0.8, 0.9, 1.0 1.1, 1.4 ] B=A<1; B=B.' C=zeros(1,numel(A)); C(B)=A(B) command window: A = 0.4000 0....

7 years ago | 0

| accepted

Answered
Finding a mean for all my data
mean(datas) mean(datas,2)

7 years ago | 0

Answered
In vsis(1),what is meaning of 1 which is under the bracket
It means that first element of vsis is accessed. An example x=10:-1:1 x(1)

7 years ago | 0

| accepted

Answered
Why am I not getting two values for my output?
An example: x1= 2; x2=4; x3=6; [y1,y2] = QuadFor(x1,x2,x3) %function call function [y1,y2] = QuadFor(x1,x2,x3) %funct...

7 years ago | 0

| accepted

Answered
use a loop to print out the fractions between 3 and 1 decreasing by 1/4
you don't need a loop: format rat i=3; limit=1; i = [3:-1/4:limit].' with loop: format rat i=3; limit=1; for i = 3:-1/...

7 years ago | 0

Answered
use a loop to print out the fractions between 1 and 3 increased by 1/4
Read about format rat format rat i=1; limit=3; while i <= limit display(i); i=i+1/4; end command window: >> C...

7 years ago | 0

Answered
HOW TO GET POLYNOMIAL EQUATION?
Read about polyfit()

7 years ago | 0

Answered
how can I add all the 7 values of 'a' in the following loop
Note: Pre-allocation is important when a loop is used. change A(1,1) to A(i)

7 years ago | 1

| accepted

Answered
Why I can't get the solution from integral function?
If you have an older version of matlab try using quad() released in 2006a but look into quadgk() as suggested by sir Walter. se...

7 years ago | 0

Answered
Matrix Multiplication using for loop
An example: A=A(:); m{1}=rand(3); m{2}=rand(3); m{3}=rand(3); m{4}=rand(3); m{5}=rand(3); m{6}=rand(3); matrix=cell(1,6)...

7 years ago | 0

Answered
sort variables from a single column
Use logical indexing to satisfy the two conditions all at once like below x=1:10; %an example x(x>5 & x<7)

7 years ago | 0

| accepted

Answered
trapz between 2 points
Example: >> x=1:10 x = 1 2 3 4 5 6 7 8 9 10 >> y=rand(1,10) y = Column...

7 years ago | 0

| accepted

Answered
Plottong double y axis with data from two different data sets for right y axis. How to create legends for two different data sets in right Y axis for MATLAB 2015a?
Try this example: yyaxis right plot(x,y) hold on plot(x1,y1) legend({'1st','2nd'},'Location',northeast) yyaxis left plot(...

7 years ago | 0

Answered
Special characters not translated
Read about sprintf() it does exactly what you want. sprintf('test \t string')

7 years ago | 1

Answered
Split array into some equal and some unequal length sections
Convert the array to cell and then use reshape()

7 years ago | 0

Answered
Saving values in a for loop
https://www.mathworks.com/matlabcentral/answers/33750-save-loop-data#answer_42390

7 years ago | 0

Answered
How to save the for loop data
EDITED x=1:0.5:20; n=numel(x); Base=cell(1,n); % PRE-ALLOCATION Top=cell(1,n); PI1=cell(1,n); for i=1:n Bas...

7 years ago | 0

| accepted

Answered
Using cell array to find corresponding values of a numeric array
https://www.mathworks.com/matlabcentral/answers/357853-find-value-in-cell-array-and-return-index#answer_282644

7 years ago | 0

Answered
How to compare two table?
Table comparison https://www.mathworks.com/matlabcentral/answers/381097-compare-two-tables-with-two-column-combinations#answer_...

7 years ago | 1

| accepted

Load more