Answered
How to replace two symbolic variables with two (1x3) arrays and result in a (1x3) array?
There are a few different ways to get it done. One of the possible ways is the next one: % r and s arrays that will replace x a...

3 years ago | 0

Answered
How to align multiple signals?
One fundamental question for signal processing is a "must", that is "what is the data sampling time or sampling frequency?" Pl....

3 years ago | 0

Answered
How can I increase the size of matrices in cell arrays with each iteration of a loop?
There are a few different ways to create such as cell array. If to get it done in a loop: rng(1) % To replicate at any time an...

3 years ago | 0

Answered
How do I create a transfer function of a high order
It can be done this way: s = tf('s'); G = (14.14*s^2 + 318.2*s + 707) / ((s^2 +20*s+101)*(100*s+1)*(0.2*s^2 + 1.2*s+1)) % Sim...

3 years ago | 0

Answered
invalid use of operator
The corrected syntax of this is: function out = modfunc(x,a); out = a(1)*exp(a(2)*x);

3 years ago | 0

Answered
How can I set the AWGN simulink block to get like this m-file setting >>> awgn(x,SNR,'measured');
One of the possible ways of attaining this is to use MATLAB Fcn block and edit the MATLABV fcn. See the attached simple Simulink...

3 years ago | 0

| accepted

Answered
How can I plot this date time graph?
Here is how you can get the plot: load('Years.mat') N = numel(Climatology.HeightSeries); plot(1:N,Climatology.HeightSeries), ...

3 years ago | 1

| accepted

Answered
phase portrait error when run
Here is the corrected code: clc; clear figure1=figure; axes1=axes('Parent',figure1,'FontSize',13); grid on; box(axes1,'on')...

3 years ago | 0

| accepted

Answered
x values when taking a numerical derivative
There will be some significantly different results from diff() and gradient() if the increment of x varies. See this simulation:...

3 years ago | 0

Answered
reading an combining excel files
There are a few different ways to get this task done. One of them is this one if your data files have the same number of numeric...

3 years ago | 0

| accepted

Answered
Convert Mat files to csv files
It can be done in three major steps: Step 1. Load data from *.mat file FN = input('Enter *.mat file name: ', 's'); D = load(...

3 years ago | 0

Answered
x values when taking a numerical derivative
Yes, you are right, e.g.: x = [0 .2 .3 .45 .65 .75 .96] y = [-3 10 11 12 13 12 9] dydx = diff(y)./diff(x) yyaxis left ...

3 years ago | 0

Answered
Error when importing data
Use one of these functions - readmatrix(), readtable(), readcell(), which are recommended. They are efficient and easy to handle...

3 years ago | 0

Answered
Code for frequency of a number of bins
This is how you can plot hist() or histogram(), e.g.: D = round(100*(randn(1000, 1)),0)+375; figure hist(D, max(D)) figur...

3 years ago | 0

Answered
How to find a gap in a table
If understood your qyestion correctly, you are trying to remove the rows of data in any row there is a missing data. If so, use:...

3 years ago | 0

Answered
can anyone please tell me what is this block
From you provided image, it looks a subsystem. The subsystem components can be adjusted using parameter values. Building a subsy...

3 years ago | 0

Answered
Count number of sheets in excel file
It is recommended to use: sheetnames() instead of xlsfinfo(), e.g.: clearvars D = uigetdir(pwd, 'Choose a folder to import XLS...

3 years ago | 0

Answered
what is the most efficient way to write multiple plots to the local drive?
In terms of time efficiency, exportgraphics() is faster than saveas().

3 years ago | 0

Answered
Area under the Peak
Here is the corrected code; clearvars; clc load('data.csv') X = data(:,1); Y = data(:,2); plot(X,Y) findpeaks(Y,X,'MinPe...

3 years ago | 0

| accepted

Answered
How do I convert ERA Interim precipitation to get total precipitation in area?
Here is how to compute annual and weekly averages of the data given in nc file. unzip('ep1.zip') vardata=ncread('ep1.nc', 'tp'...

3 years ago | 0

| accepted

Answered
How to display specific values in xticks?
Here is the corrected code: clearvars; clc;close all; figure; clf('reset'); %data1=[0.0982000000000000 0.10000000000000...

3 years ago | 0

| accepted

Answered
Remove page numbers from extractFileText
If the file to be imported is uniformly page numbered, then its page numbers can be detected and removed using the fcn - detecti...

3 years ago | 0

Answered
How to load multiple input txt file in matlab?
For your exercise, if your data files contain the same data type in terms of columns, then you can use this code to collect all ...

3 years ago | 0

| accepted

Answered
3D Image Rotation Problem
You can try pagetranspose() function: HH = membrane; tiledlayout(2,1) nexttile surfc(HH) HR = pagetranspose(HH); nexttile ...

3 years ago | 0

Answered
How to save a Figure to a PNG File
Here are two different ways how you can save the plot figure output in .png: F = @(t)exp(sin(2*t)); fplot(F, [-pi, pi]) grid ...

3 years ago | 0

Answered
Unable to plot a graph
Here is the corrected complete code: clearvars syms lambda Z_L = 25; Z_C = 50; z_L = Z_L/Z_C; y=@(lambda)(Z_C*((z_L+1i*t...

3 years ago | 0

Answered
I would like to add different colors in an interactive geobubble graph
Here is the code that shall give different colors: % Read data from Excel file and create Table in matlab t = readtable("fil...

3 years ago | 0

Answered
cannot exporting high resolution video?
Try this function: exportgraphics() See DOC

3 years ago | 0

Answered
How to read data from a Excel file and insert data within each sheet in a already created cell array
This is how it can be attained: load('Test.mat') % FName ='Test.xlsx'; S_names = sheetnames(FName); for ii=1:n...

3 years ago | 0

| accepted

Answered
help to find error in this?
Here is the corrected code. But you need to check your Jacobian matrix formulations; otherwise, this exercise is not solvable: ...

3 years ago | 1

| accepted

Load more