Need help with storing values in a table and/or matrix

조회 수: 2 (최근 30일)
EE_student
EE_student 2021년 3월 20일
답변: EE_student 2021년 4월 24일
Hi all,
I am trying to find complex values, gain and gain in dB for a transfer function at specific frequenciies. For this purpose I used for loop and plotted the bode plot and nicholls chart using the DSP toolbox's inbuilt functions.
So, I want Matlab to produce answers like in the screenshot attached. I have of course attached my matlab file too. Please have a look and give me advice.

답변 (2개)

Seth Furman
Seth Furman 2021년 3월 22일
If you want to create a table like in the attached screenshot, you can use the table constructor. For example,
>> table([0.01;0.25],[-0.0040;-0.0084],'VariableNames',["Freq. (rad/s)","Real"])
ans =
2×2 table
Freq. (rad/s) Real
_____________ _______
0.01 -0.004
0.25 -0.0084
  댓글 수: 1
EE_student
EE_student 2021년 3월 25일
Thank you. However:
This is not what I asked for. To be clear, how can I input this in the for loop so it automatically creates the table for me. I do not want to manually input all the values myself into the table command that misses the point.

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


EE_student
EE_student 2021년 4월 24일
Response to Seth Furman
Thank you. However:
This is not what I asked for. To be clear, how can I input this in the for loop so it automatically creates the table for me. I do not want to manually input all the values myself into the table command that misses the point.

카테고리

Help CenterFile Exchange에서 Get Started with Control System Toolbox에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by