Community Profile # Voss

Last seen: Today Active since 2013

#### Statistics

All
• • • • • • • • • • • • #### Content Feed

View by

Size mismatching using "find" command
for i=1:length(FileList) idx = find((floor(mean_GMT_min_mean_ref(i,:))==2),1,'first'); if isempty(idx) y(i,1)...

5 días ago | 0

| accepted

How do I copy some files to another folder?
for j = 1:size(file_list,1) copyfile(file_list(j),destination_folder) end

6 días ago | 0

| accepted

while trying to automate keyPress event in a loop, I get the error: "Unrecognized function or variable 'VK_i'
key = java.awt.event.KeyEvent.(sprintf('VK_%d',i));

9 días ago | 0

| accepted

display variables with different classes
Maybe use fprintf for this a = [0.0029 0]; b = {0 0.5 0.5 10}; c = '20220807T063730'; fprintf(1,'%s',c) fpr...

10 días ago | 0

| accepted

for loop index picking only elements of given vector
for j = V

10 días ago | 0

| accepted

for loop for two particular days of a week
n_weeks = 50; vec = reshape((0:n_weeks-1)*7+[1;4],1,[]);

10 días ago | 1

Find lower query points compared to the Reference vector
load data.mat; idx = zeros(size(Beg_Data)); for ii = 1:numel(Beg_Data) idx(ii) = find(Beg_In_Ex <= Beg_Data(ii),1,'last...

11 días ago | 0

| accepted

loop to extract rows and giving the vectors progresseiv numbers
There's no need to make each of several rows of a matrix into its own variable (M1, M2, etc.) https://www.mathworks.com/matlabc...

11 días ago | 0

| accepted

Graph matrix B with colormap based on matrix A
cq = griddata(x,y,A(:,3),xq,yq); mesh(xq,yq,zq,cq)

12 días ago | 0

| accepted

how to solve 'ones error' in my code below
nf should be an integer.

13 días ago | 0

| accepted

After the if statement is ran why is the answer 10?
A=1; B=2; C=10; if A<0 % false (1 is not less than 0) % ... nothing in here executes end disp(C) % C remains 10

18 días ago | 0

| accepted

I have a problem with my plot. I need to plot one curve for every value of the matrix "Vgs", but i need all the curves in one graphic (and considering the conditions)
hold on clear k = 1; % use semi-colons to suppress command-line output Vt = 0.6; L = 0.01; Vds = linspace(0,5,200); Vgs = ...

19 días ago | 0

i have to plot the percentage of heads by the times token is trowed times, in a game of head or tail, but a need help for doing that. What can I use in my plot?
% N = input('Coloque um valor para N: '); N = 2500; x = round(rand(1,N)); figure histogram(x); title('Total #') xticks([...

19 días ago | 0

Unrecognized function or variable
This is correct: TF = contains({files_in_folder.name}, app.SelectTestID.Value); And the reason you get the error that VideoFil...

19 días ago | 1

I wanna do the plot exactly the same as the attached picture, my Y axis should start from 0.0001. and i need to draw this red dashed line from the end of plot point to x axis

19 días ago | 1

| accepted

How to plot a function within a for loop?
You're plotting one point at a time there, which won't appear unless you use a data marker. And even then you'll only see the la...

19 días ago | 1

| accepted

have to plot the number of head in a game of head or tails that the token is trowed N times, but my plot dont work
% caras = cara + 1; cara = cara + 1; That will get the total number of heads (a.k.a. faces) to be correct, but you'll still be...

19 días ago | 0

| accepted

How to tick the parameter in the plot of a parametric function?
t = linspace(0, 1, 1000); x = t.^2; y = t.^3; tick_length = 0.04; t_tick = linspace(0,1,21); x_tick = t_tick.^2; y_tick...

19 días ago | 2

| accepted

Plotting a sinusoidal wave.

19 días ago | 0

Matlab keeps giving me error for invalid syntax! I don't understand why
Missing comma: % fprintf('Le soluzioni distinte sono %12.2f \n' A1, A2) % ^ ...

19 días ago | 1

| accepted

How to find the maximum value of C that corresponds to a set of X,Y coordinates?
X = 1:3:31; Y = 1:2:13; C = rand(numel(Y),numel(X)); imagesc(X,Y,10*log10(C)) [maxC,idx] = max(C(:)) [yidx,xidx] = ind2su...

19 días ago | 1

how to compare two consecutive values in a matrix
temp=[1,2,2,1;3,4,4,3;5,6,6,5;7,8,8,7] In each row, you have one fewer comparisons than you have elements, so M is of size one ...

19 días ago | 0

| accepted

How to make inset figure with two y-axes
Seems to be ok: % initial plot plot(rand(1,10),rand(1,10)) % make the inset axes('Position',[0.4,0.7,0.2,0.2]) box on ...

19 días ago | 0

| accepted

Mean of a field of a struct containing arrays
% First, to approximate your struct array, I create a % 3x1 struct array S, with a field 'crop', each of % which is a 206x15...

19 días ago | 1

| accepted

How to change change color of line or patch in legend
The problem: the first patch is used as a legend entry: figure() hold on patch() plot([0 1]) patch() plot([1 0]) hold off...

19 días ago | 0

Creating a stacked bar plot with a non-unique x-axis.
Does this work? x = [2, 3, 6, 9, 2, 6, 2, 5, 4]; y = [4, 2, 3, 1, 3, 2, 5, 2, 5]; xx = min(x):max(x); nxx = numel(xx); co...

20 días ago | 0

| accepted

How can I generate a sinusoidal wave in Matlab in one plot?
t_start = 0; t_end = 1; t_step = 0.002; % 0.002 looks more like a sinusoid than 0.02, but do what you like f = 20; t = lin...

21 días ago | 0

| accepted

stringcmp filenames with similar naming
"Is there a good way to match files from different folders together?" Here's an approach using dir, fullfile, fileparts, strcat...

23 días ago | 0