How to plot a matrix from a bigger matrix?

조회 수: 1 (최근 30일)
Herline van der Spuy
Herline van der Spuy 2021년 6월 30일
댓글: dpb 2021년 6월 30일
Not sure that I worded the title question right, but anyways...
I've got a 165x6 matrix. Columns are:
Frequency, Complex Modulus, Phase Angle, Storage Modulus, Loss Modulus and Temperature.
There are 10 temperatures: -24, -18, -12, 10, 15, 25, 35, 45, 60, 70°C. The first three temperatures (I call these the BBR temps) each only have 6 points. The other 7 temperatures (I call DSR temps) each have 21 points. I need to plot frequency vs complex modulus. I wanted to create a frequency matrix so that all 10 temperatures' frequency values are in it, and the same with the complex modulus, you know so that I can plot those two. But I'm not sure how to do that. So I thought about creating a Frequency matrix for the BBR temps and a frequency matrix for the DSR temps. The same for the complex modulus. And then I could plot the frequency vs complex modulus. But the plot is wrong, the BBR values have the same colour as the DSR ones.
My code and a snip of the matrix:
BBR = [Temp1;Temp2;Temp3]
DSR = [Temp4;Temp5;Temp6;Temp7;Temp8;Temp9;Temp10]
FrequencyBBR(1:6,1:3) = reshape(BBR(:,1),[6, 3])
FrequencyDSR(1:21,1:7) = reshape(DSR(:,1),[21,7])
ComplexBBR(1:6,1:3) = reshape(BBR(:,2),[6,3])
ComplexDSR(1:21,1:7) = reshape(DSR(:,2),[21,7])
scatter(FrequencyBBR,ComplexBBR)
hold on
scatter(FrequencyDSR,ComplexDSR)
  댓글 수: 1
dpb
dpb 2021년 6월 30일
If'en it's just the color, you can set it in the call to scatter

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Scatter Plots에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by