how do i make a waveform plot from this data ?
조회 수: 6 (최근 30일)
이전 댓글 표시
Struggling to code this plot, all i have to do is make a plot however i was never taught how to use matlab without a script
댓글 수: 2
Daniel Pollard
2021년 1월 14일
Once you've done that, the documentation will be your best friend for all things Matlab. If you want to learn how to plot two variables against each other, google "matlab plot" and the top result is the manual on how to use the function, the inputs it can take and multiple examples.
Cris LaPierre
2021년 1월 14일
Agreed. Ch 9 of MATLAB Onramp introduces plotting in MATLAB.
Btw, you have not shared your data with us. Your mat file is actually a function for importing a mat file.
>> load('tidegauge.mat')
Error using load
Unable to read MAT-file C:\Users\clapierr\OneDrive - MathWorks\MATLAB Answers\tidegauge.mat. Not a binary MAT-file. Try load -ASCII to read
as text.
>> load('tidegauge.mat','-ascii')
Error using load
Unable to read file 'tidegauge.mat'. Input must be a MAT-file or an ASCII file containing numeric data with same number of columns in each
row.
>> type('tidegauge.mat')
function importfile(fileToRead1)
%IMPORTFILE(FILETOREAD1)
% Imports data from the specified file
% FILETOREAD1: file to read
% Auto-generated by MATLAB on 14-Jan-2021 09:39:26
% Import the file
newData1 = load('-mat', fileToRead1);
% Create new variables in the base workspace from those fields.
vars = fieldnames(newData1);
for i = 1:length(vars)
assignin('base', vars{i}, newData1.(vars{i}));
end
답변 (1개)
Priyanka Rai
2021년 2월 1일
MATLAB Onramp introduces how to “Visualize variables using MATLAB's plotting functions” in chapter ‘Plotting data’.
To plot waveform from waveform library, you can use this function:
plot(pulselib,idx)
Refer this documentation for further details:
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Import and Analysis에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!