I have mat file need to substract 24rows x 1column . Please provide solutions .

1 view (last 30 days)
Load. N1 N2. S1. S2. 0. 2.55 8.999. -5.6363 2.9636 11.23 3.400 4.330. -7.3333. -8.999. Need to substract in N1 =3.400-2.55. Like for n rows
  3 Comments
solleti prabhakarchary
solleti prabhakarchary on 12 Jul 2022
I have values of different loads and N1 values .Need to substract with row2-row1,row3-row1....like row1 was constant here.
Dyuman Joshi
Dyuman Joshi on 12 Jul 2022
Your statement is still quite unclear.
From what I have understood,
y=randi(20,4,5)
y = 4×5
9 18 2 3 11 6 6 12 18 8 18 18 19 9 10 17 1 20 13 11
for i=2:size(y,1)
z=y(i,:)-y(1,:)
end
z = 1×5
-3 -12 10 15 -3
z = 1×5
9 0 17 6 -1
z = 1×5
8 -17 18 10 0

Sign in to comment.

Answers (0)

Categories

Find more on Data Distribution Plots in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!