Respondida
how to simulate air conditioning compressor using simulink ?
Here are a few points how to start on this exercise. (1) MATLAB/Simulink has a nice builtin simulation model example: https:/...

más de 3 años hace | 0

Respondida
plotting data from multiple sheets by ID and day
Here is the complete solution code: FName = 'RLC_AD.xlsx'; for jj=1:numel(sheetnames(FName)) RLCAD = readmatrix(FName, 'Sheet...

más de 3 años hace | 0

Respondida
Removing numerical data from txt file
Here is the solution: unzip('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1300600/CONTROLDS2247_SGI_PPCS_Bat...

más de 3 años hace | 0

Respondida
why is my plot blank?
It looks like that the whole imported data is not taken for x and y to plot them. See - e.g.: D = readtable('DATA_A.csv'); x =...

más de 3 años hace | 0

Respondida
How introduce column vector in M-file?
Here is the corrected code: D = 15; tmpI = eye(D); ket = sum(tmpI(:,2:D),2); syms n ct = 6; creation = circshift(diag(sqrt...

más de 3 años hace | 0

| aceptada

Respondida
Collection of Squares RGB Matrix
If understood correctly, here is one example: M = uint8(ones(10)); R = [255*M M M 255*M M; M 255*M M M 255*M; M M ...

más de 3 años hace | 0

Respondida
Finding Limits of Two variables
Here is a small example: syms x y f(x, y) f(x, y) = 2*x^2 + y^3; XLIM = limit(f(x,y), x, sqrt(Inf)) YLIM = limit(f(x,y), y, ...

más de 3 años hace | 0

Respondida
I don't know why I can't open a text file?
(1) Do you have your downloaded file (age.txt) in your MATLAB's current directory OR (2) Did you show the directory address wh...

más de 3 años hace | 0

Respondida
Find the unique arrays in a list of arrays
One of the viable fcns to use here is isequal(), e.g.: A = [0 1 1;1 1 1]; B = [1 1 1;0 0 1]; C = [0 1 1;1 1 1]; ALL{1} = A; ...

más de 3 años hace | 0

Respondida
problem on saving within a folder of the figures I'm going to generate
Try exportgraphics() to save the image graphics

más de 3 años hace | 0

Respondida
time-frequency analysis of multi-component chirp
Here are the frequency and the time-frequency analyses of the Chirp signal: Fs = 1000; L = 2000; T = 1/Fs; t = (0:L-1)*T; ...

más de 3 años hace | 0

| aceptada

Respondida
How to improve a simple code so it takes and calculates several resistance values as shown in table?
Here is the completed code with the for .. end loop: t = linspace(0, 0.1, 1000); R = [1 100 300 560 1000]; R_L = 1E+5; c = 1...

más de 3 años hace | 1

| aceptada

Respondida
if-else if inside the for loop
Here is how to do it in for .. end loop N = 1:24; for ii=1:length(N); if ismember(ii, [1,2,4,5,6,13,14,16,17,18]) ...

más de 3 años hace | 0

| aceptada

Respondida
two x-axis plot
Here is a corrected code: x1 = [500 850 1200]; x2 = [0.1 0.2 0.3]; t = tiledlayout(1,1); ax1 = axes(t); hAx(1)=gca; hAx(...

más de 3 años hace | 0

Respondida
remesh code for a 3D geometry
An alternative mesh fcn in MATLAB is ndgrid() - see this example: xx = linspace(-pi,pi, 20); [X,Y] = ndgrid(xx); Z = 2*X.*exp...

más de 3 años hace | 0

Respondida
remesh code for a 3D geometry
It is worth testing these fcns for remeshing: griddata() griddatan() delaunayn()

más de 3 años hace | 0

Respondida
how to use fft to plot the average values and their standard deviations in the frequency domain?
First of all, both signals need to be in one domain. If the freq domain is chosen then both need to be in the freq domain. In...

más de 3 años hace | 0

| aceptada

Respondida
how to plot a signal in the time domain?
This issue is related to the order of the data series that can be solved using sort() fcn. See this example: x = [7 -1 3 ...

más de 3 años hace | 0

| aceptada

Respondida
Figure legend mismatch when using gobjects
Try this syntax: figure; GObjects = gobjects(18,1); L = {"r bound","m bound","ns bound","r elong","m elong","free"}; color...

más de 3 años hace | 0

Respondida
Using a column of cells as variable names in a table
Here is how to get this assignment done: T = readtable('Properties.xlsx'); T2 = table(T.Var2, 'RowNames',T.Var1) T2 = rows2va...

más de 3 años hace | 2

Respondida
Removing numerical data from txt file
Here is one of the possible solutions for this exercise regexprep(): Text=readlines('Citation.txt') % Read data file with text...

más de 3 años hace | 0

Respondida
using scope in Matlab Simulink to display when input's value changes
It is a very intersting exercise. There are a few different ways to get simulation results for different values of a as defined ...

más de 3 años hace | 1

Respondida
fill in the area in plot
Use patch(). How far it is different from your previous post: https://www.mathworks.com/matlabcentral/answers/1914560-how-to-...

más de 3 años hace | 0

Respondida
Time-frequency analysis using spectogram
There are a couple of inconsistencies (fs value was incorrect and not read from the signal27.mat) in the code. Here is the corre...

más de 3 años hace | 0

| aceptada

Respondida
How to convert a uint8 image to complex double?
One of the dimensions can be removed using squeeze() fcn or taking averaged pixel values from R, G, B layers: D = imread('01.pn...

más de 3 años hace | 0

| aceptada

Respondida
Accurate measurement of inverter and motor efficiency
One quick note is the equations and conversions. It looks like there is a "pi" magnitude problem in your calculations of power. ...

más de 3 años hace | 0

Respondida
how to put date and time (exple 02-17-2023 06:05:34) on the x axis of a 3D plot
Use readtable while importing your data into matlab and plot - see this example: Data= readtable('DATA_Ts.csv', 'Format','%s%{d...

más de 3 años hace | 1

Respondida
Chebyshev type 2 filter comparison on bode plot
Here is how it can be achieved - see the last figure. The fcn linkaxes() is needed. fc = 1000; fs = 8000; [b1,a1] = cheby2(1,...

más de 3 años hace | 0

| aceptada

Respondida
how to modify a plot
This is how it can be attained: clear all W=45000; S=9; b=7.5; clmax=2; clmin=-1; nmax=4; AR=7; nmin=-3; clalpha = 2*p...

más de 3 años hace | 1

Respondida
plot a graph from loop
One of the possible ways to plot nv vs, V is to include cl values that leads to 3D plot, e.g.: ... alpha = 1:0.25:12; nv=nmin...

más de 3 años hace | 0

Cargar más