Respondida
how do I find where a function is defined (equivalent of "which" command in bash)
which count

alrededor de 5 años hace | 1

Respondida
Save number of iterations in a for loop
An easy solution is: n=10; for i=1:n tspan=[0 max(EXP.t)]; MAT=[SYSTEM.m_BW(i) SYSTEM.w_L(i) SYSTEM.w_K(i) SYSTEM...

alrededor de 5 años hace | 0

| aceptada

Respondida
How can i take multiple images from a folder (which is almost 800!) and perform specific operation?
You'd need to employ for or while loop with the following loop structure: M_FOLDER = '???\MATLAB'; % Directory where all image ...

alrededor de 5 años hace | 1

Respondida
Plotting points on a graph every 15 minutes
You had better use timer class: https://www.mathworks.com/help/matlab/ref/timer-class.html

alrededor de 5 años hace | 0

Respondida
how can i plot the amplitude spectrum of these signals
Fs = ... % Sampling freq t = ... % Time F = 0.25+cos(2*pi*50*t); L = length(F); N = 2^nextpow2(L); Y = f...

alrededor de 5 años hace | 0

Respondida
When creating a table, how do I specify the dimensions of a particular variable?
It is better to create a zero matrix and then assign a table variable, e.g.: Nrows=10; Ncols=8; A = zeros(10, 8); my_table ...

alrededor de 5 años hace | 0

Respondida
how to calculate mean square error ?
You have already computed in the last line of the code. Maybe you meant root mean square error. If so, MSE = mean(fit_err.^2); ...

alrededor de 5 años hace | 0

Respondida
Creating a simulink model to analyse the harmonics on the substation
You can model your exercise simulation model in combination MATLAB+Simulink. Simulink modelling is strainghtfoward. If you don't...

alrededor de 5 años hace | 1

Resuelto


ABBREVIATION
Abbreviate the given string. Consider Only Capital Letters. EXAMPLE If input is 'Abbreviation of The Given String' then ou...

alrededor de 5 años hace

Respondida
How to display subplot with multiple image with its own x and y axes ?
subplot(2,2,1); imshow(Newforegnd); % Use this command axis on ...

alrededor de 5 años hace | 1

Respondida
Trial and error help needed
You can start by studying how to employ some MATLAB's built in fcns, such as, hexToBinaryVector()

alrededor de 5 años hace | 0

Respondida
How to plot the fft if we are having the data ?
Hi, Here is a correct and complete code for fft calc and plot with your data given in .xls data file: clearvars; clf; D=rea...

alrededor de 5 años hace | 0

Respondida
Lowest value of n for a fibonacci series
f(1)=a; f(2)=b; k=2; while f(k)<1e5 f(k+1)=f(k-1)+f(k); k=k+1; end fprintf('The final value is %d \n', f(end))

alrededor de 5 años hace | 0

Resuelto


How many digits are there?
Input(s) - any string Output(n) - number of digits within string s

alrededor de 5 años hace

Resuelto


Convert Two Character String into a Binary Vector
Given a string "XOXXO" convert it into a binary vector. [1 0 1 1 0] Paul Berglund implemented an optimal method in <http://ww...

alrededor de 5 años hace

Resuelto


MATLAB Basics: Complex Numbers
For a given complex number, x, return the real and imaginary parts as a vector, y = [Real Imaginary].

alrededor de 5 años hace

Respondida
Errors I have never encountered:Error using randg
Maybe, you would need to refresh up your matlab with: clear all and restart it.

alrededor de 5 años hace | 0

Respondida
How can I generate audio chirp signal ?
Just using audiowrite(), e.g.: t = linspace(0, 4.8, 4.8E+4); f0 = 200; f1 = 10000; Fs = round(1/mean(diff(t))); % Has to...

alrededor de 5 años hace | 0

Resuelto


Find out characteristics equation of given matrix.
Find out characteristics equation of given matrix. A=[0 2; 1 8] then char. eq is s^2-8*s-2=0 and answer should be [1 -8 -2]

alrededor de 5 años hace

Respondida
Remove steps in signal
Use: detrend() Remove: mean()

alrededor de 5 años hace | 0

| aceptada

Respondida
Cell array and matrix operation
for ii=1:4 for jj=1:4 ANS{ii,jj} = (A*C{ii,jj}-B*C{ii,jj})/((C{ii,jj}.^2).*C{ii,jj}.*(1+(B./C{ii,jj}).^2)).^(1.5); ...

alrededor de 5 años hace | 1

| aceptada

Respondida
Unable to concatenate the table variables
FName='myout.csv'; D= readtable(FName); DATA= [D.Var1, D.Var2];

alrededor de 5 años hace | 0

Respondida
why Discrete Time Integrator block is not working in For iterator subsystem?
See attached a simple example employing a [discrete integrator] works ok with [for loop] subsystem.

alrededor de 5 años hace | 0

Respondida
How is the transfer function determined for a PID controller
T = tf(Kp, [1 10 20+Kp]);

alrededor de 5 años hace | 0

| aceptada

Resuelto


List the nth prime quartet prefix
Prime numbers larger than 5 can end only in 1, 3, 7, or 9, but of course not all numbers ending in these four digits are prime. ...

alrededor de 5 años hace

Resuelto


Roman numbers: how old is that building?
The front of old buildings sometimes show the year when they were built in roman numbers. These number are rather confusing and ...

alrededor de 5 años hace

Resuelto


Minimum jumps to reach end of the array
Given an array of integers where each element represents the max number of steps that can be made forward from that element. Ste...

alrededor de 5 años hace

Respondida
Adding Legend to Bar Graph
Why you keep using this useless (removed) part of your code: for i = 1:length(StepsS2.Time) switch StepsS2.ActivityType(i) ca...

alrededor de 5 años hace | 0

Resuelto


Write script that gives matrix like the following example:)
if x=2; y=[2 1; 1 1] if x=4; y=[4 3 2 1 3 3 2 1 0 2 2 1 0 0 1 1] if x=5; y=[5 4 3 2 ...

alrededor de 5 años hace

Resuelto


Draw matrix 'Swiss flag'( Euro 2020)
Draw a x-by-x matrix 'Swiss flag' using '1' and 0.(x is odd and bigger than 4) Example x=5 ans = [1 1 1 1 ...

alrededor de 5 años hace

Cargar más