Community Profile

photo

Voss


Last seen: Today Active since 2013

Statistics

All
  • MATLAB Central Treasure Hunt Finisher
  • Treasure Hunt Participant
  • 12 Month Streak
  • Thankful Level 4
  • Commenter
  • Leader
  • Ace
  • Revival Level 4
  • Knowledgeable Level 5
  • Promoter
  • Scholar
  • CUP Challenge Master

View badges

Content Feed

View by

Answered
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)...

1 dag ago | 0

| accepted

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

2 dagen ago | 0

Answered
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));

5 dagen ago | 0

| accepted

Answered
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...

6 dagen ago | 0

| accepted

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

6 dagen ago | 0

| accepted

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

6 dagen ago | 1

Answered
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...

7 dagen ago | 0

| accepted

Answered
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...

7 dagen ago | 0

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

8 dagen ago | 0

| accepted

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

9 dagen ago | 0

| accepted

Answered
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

14 dagen ago | 0

| accepted

Answered
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 = ...

15 dagen ago | 0

Answered
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([...

15 dagen ago | 0

Answered
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...

15 dagen ago | 1

Answered
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
How about this? Theta_x = readmatrix('Theta_x.txt'); POE_Y = readmatrix('POE_Y.txt'); plot(Theta_x,POE_Y) hold on plot([m...

15 dagen ago | 1

| accepted

Answered
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...

15 dagen ago | 1

| accepted

Answered
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...

15 dagen ago | 0

| accepted

Answered
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...

15 dagen ago | 2

| accepted

Answered
Plotting a sinusoidal wave.
https://www.mathworks.com/matlabcentral/answers/1769250-how-can-i-generate-a-sinusoidal-wave-in-matlab-in-one-plot

15 dagen ago | 0

Answered
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) % ^ ...

15 dagen ago | 1

| accepted

Answered
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...

15 dagen ago | 1

Answered
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 ...

15 dagen ago | 0

| accepted

Answered
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 ...

15 dagen ago | 0

| accepted

Answered
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...

15 dagen ago | 1

| accepted

Answered
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...

15 dagen ago | 0

Answered
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...

16 dagen ago | 0

| accepted

Answered
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...

17 dagen ago | 0

| accepted

Answered
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...

19 dagen ago | 0

Answered
How do i delete the spaces that are in the middle of a string array?
To delete elements from an array, set them to [] (or ''). % to removes spaces (' '): str=' 123 456 '; str(str == ' ') =...

19 dagen ago | 1

Answered
How to build a loop through every column and row of a cell
% first, I create a 32x3 cell array of random 10x10 matrices C = arrayfun(@(x)randn(10),zeros(32,3),'uni',false) % now loop th...

19 dagen ago | 0

| accepted

Load more