Printing in the command window

조회 수: 3 (최근 30일)
kajalschopra
kajalschopra 2015년 7월 27일
댓글: Walter Roberson 2018년 11월 16일
I have created a .m file.
In the .m file, I have the following code;
N_C=xlsread('C:\Users\Kajal Chopra\vibrations\free_vibrations_program\matlab_input_free_vibrations_1','Sheet1');
t=1;
I want to print the values of N_C in the command window.
When I type N_C (or even t) in the command window , nothing happens.
How can I print the value of N_C in the command window?

채택된 답변

Walter Roberson
Walter Roberson 2015년 7월 27일
disp(N_C)
If the result is empty then check
isempty(N_C)

추가 답변 (1개)

Der Die
Der Die 2018년 11월 13일
Hi,
I would like to ask you how to print in command window like
result =
45464.1324564 56464.321312321231313 4654564.54544654654
but to get the numbers (with long format ) in one row not to get it in columns because of long number.
For an example to get information in command window as we define it for parameter . For an example:
A=A_param; %(A_param=1)
in command window is :
A =
1
  댓글 수: 1
Walter Roberson
Walter Roberson 2018년 11월 16일
I am not sure what you are asking, but if you have format long in effect, then
A = A_param(:).'
This will work whether A_param is a scalar, a row vector, a column vector, a 2D array...

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by