Answered
Renaming multiple files in each folder
You can use movefile.

5 years ago | 0

Answered
how can I extract these cell array from
function out = parse_url_options(url) idx = find(url == '='); s_idx = find(ismember(url,'?&')); e_idx = find(ismember(url,'...

5 years ago | 0

Answered
Select variables from randi and calculate the sum
One way: A = randi([10 100],5,22); total = 0; for i = 1:numel(A) if A(i) >= 40 && A(i) <= 75 total = total+A(i)...

5 years ago | 0

| accepted

Answered
Debug nested loop to calculate frequency sampling fir filter coefficients
Consider this loop: k = [2 7 15 40 99]; for k = 1:(length(k)-1)/2 % this line redefines k % do stuff end % after the lo...

5 years ago | 0

| accepted

Answered
Error: Array indices must be positive integers or logical values
Avoid doing str2double on the slider value. Just do this: n=get(handles.slider1,'Value'); The error happens because str2double...

5 years ago | 1

| accepted

Answered
I need to load an image to apply my filter registration code but cannot get the image to load. The image is in a matlab file, but keep getting an error loading, line 9.
Put the file name in quotes, and put jpg in quotes: photo = double(imread('undergraduate_data.mat','jpg')); Otherwise the inte...

5 years ago | 0

Answered
Error using sgtitle?
sgtitle is interpreting the second argument you give it (i.e., ['Over 37.5 = ' num2str(meanover) 'Under 37.5 = ' num2str(meanund...

5 years ago | 0

Answered
Struggling to plot this graph
Remove the (i) indexing in your calls to plot. This will make plot create one line per call with all the time points rather than...

5 years ago | 0

| accepted

Answered
Removing data from an array using subsets
Use logical indexing to identify and remove the zero-elements from x: x = [0;0;0;0;1;1;1;0;1;1]; x(x == 0) = [];

5 years ago | 0

| accepted

Answered
Adding values to a matrix in for loop
Each time through the loop, the code is concatenating the vector values_change onto the end of the vector values. (Note that the...

5 years ago | 1

Answered
outputs from nested functions
Each nested function has its own workspace but they all 'see' variables from the parent workspace. function parent() x =...

5 years ago | 0

Answered
Why do i get the error: Array indices must be positive integers or logical values?
This expression in the loop: deltaT((windTurbineRotorModel(WindSpeeds,Ct,D,Vcutout,Vrated,Vcutin))-(k*omegaRotor(i-1).^2)/j) s...

5 years ago | 0

| accepted

Answered
Show more digit number in command window
https://www.mathworks.com/help/symbolic/digits.html

5 years ago | 0

| accepted

Answered
how i can plot three vactors(x,y,T) useing contour
You cannot. contour requires a matrix.

5 years ago | 0

Answered
Finding coefficients of variables of specific powers
Problem 1: Try using the 'All' flag in your call to coeffs.

5 years ago | 0

| accepted

Answered
How would I get this started (kinda stumped)? I know I need to use a for loop but I am rusty on those.
The good news is you don't need to use a for loop. k = 1:100; result = sum(14*k.^3-20*k.^2+3*k);

5 years ago | 0

Answered
what does this error mean? Error using snr Expected input number 2, Fs, to be a scalar.
This error means that the second input argument to the function snr is interpreted by MATLAB - based on how your code calls snr ...

5 years ago | 0

Answered
Why won't my function graph?
You have to use .* (element-wise multiplication) rather than * (matrix multiplication): y = 3*exp(-x/3).*sin(pi*x);

5 years ago | 0

Answered
Loop. Do while loop in matlab
So you have some code like this, right? A = 0; while A < 8 % do something A = A+1; end This loop will iterate 8 ti...

5 years ago | 0

| accepted

Answered
Plot function in matlab
You can use loglog to get a plot with both axes in log scale or semilogx to get one with just the x-axis in log scale.

5 years ago | 0

Answered
How to plot two vectors and one matrice
surface(mute_rate,mute_step,results)

5 years ago | 0

Answered
How can I start the cumulative from a specific year?
load('DATI_ECM_GIORNALIERI') idx = find(DATIECMWFgiornalieri{:,1} == 2015,1); C1 = cumsum(DATIECMWFgiornalieri{idx:end, 4});

5 years ago | 0

| accepted

Answered
Different between plot after STFT and that using the surf function in Matlab
One surface is of SV and one is of 20*log10(abs(SV)). Does that explain the difference you observe?

5 years ago | 0

| accepted

Answered
how to craet the same function but without loop
Here is one way: function Xne = decode( H, Zn0, nIter, verbose ) [ M, N ] = size( H ) ; LMN = zeros( M, N ) ; ZMN = repmat(...

5 years ago | 0

Answered
How to split 128x128 array into 64 ( 2x128 ) ?
Let x be your original (128x128) array. Here's one way to create 64 arrays of size 2x128, which I will store in a single cell ar...

5 years ago | 0

| accepted

Answered
why do I get an error when I pressthe radio button in my GUI
One error you might get is that variable 'radiobutton1' is undefined. You should refer to it as 'handles.radiobutton1'.

5 years ago | 0

Answered
Using for loop for cell array
clc;clear;close all bw = rgb2gray(imread('image_3.png')); figure;imshow(bw);title('orginal image') [B,~,N]=bwboundaries(b...

5 years ago | 0

| accepted

Answered
Arranging values from highest to lowest using sort function Matlab
sort_a = sort(a,'descend');

5 years ago | 0

| accepted

Answered
Vectors must be the same length
plot takes vectors in pairs of arguments, like plot(x1,y1,x2,y2, ...) The second call to plot in your code uses three numeric a...

5 years ago | 0

Answered
How to return the graph axis from 3d axis to 2d axis after I click on the clear button (In GUI)?
One way is: set(gca(),'View',[0 90]); This assumes that your axes is the current axes in the current figure. If this is not th...

5 years ago | 0

| accepted

Load more