Community Profile

photo

_


Last seen: Today Active since 2013

Statistics

All
  • MATLAB Central Treasure Hunt Finisher
  • Treasure Hunt Participant
  • Thankful Level 3
  • 6 Month Streak
  • Commenter
  • Leader
  • Guiding Light
  • Revival Level 4
  • Knowledgeable Level 5
  • Promoter
  • Scholar
  • CUP Challenge Master

View badges

Content Feed

View by

Answered
How to make a two-dimensional mask act on a three-dimensional array?
You can replicate your matrix D=any(isnan(B),1) in the first dimension using repmat, generating a 3D logical array the same size...

33 minutes ago | 0

Answered
writing z with asterisks
Like this? fprintf('*****\n * \n * \n * \n*****\n')

environ une heure ago | 0

Answered
max value of N arrays
You say they're column vectors in the description, but the example uses row vectors. It doesn't really matter, you can do it eit...

environ 2 heures ago | 0

Answered
If statement not replacing matrix elements correctly
I think you mean: cpoffcorr = zeros(1,simnum); % yes, pre-allocate for i = 1:simnum if cpoff(i) > 0 % check the ith eleme...

environ 2 heures ago | 0

| accepted

Answered
How to add legend (or colorbar) to volshow/labelvolshow output?
Maybe something like this can be a start: volume_labeled = randi(10,[5 5 5]); view_panel = uipanel(figure,'Title',"Titolo");...

environ 3 heures ago | 0

Answered
Reordering legend items deletes legend handle - how can I get them back?
Maybe you will have better luck modifying the order of the lines and their names in the call to legend, rather than reordering t...

environ 4 heures ago | 0

Answered
how to extract data from ascii file?
data = readmatrix('qwer.txt') plot(data(:,1),data(:,2),'.-') "in this file around 2000 data is present ...and i need only 1001...

environ 4 heures ago | 0

Answered
How to extract only first peak of each pulse (positive or negative) in sequence throughout the signal
load Example.mat data = C; t = 1:length(data); [p,s,mu] = polyfit((1:numel(data))',data,1); fn = polyval(p,(1:numel(data))...

environ 5 heures ago | 0

Answered
Can you have a multilevel table?
You can use 'MergeAsTable',true in mergevars: load patients T1 = table(LastName,Gender,Age,Height,Weight,Systolic,Diastolic); ...

environ 5 heures ago | 0

Answered
Set length of plot axis
You can use axis padded x = -1:0.1:1; y = 2.5-x.^2; plot(x,y) axis padded Or set the y-limits: x = -1:0.1:1; y = 2.5-x.^2...

environ 22 heures ago | 1

| accepted

Answered
How to loop through each row of a column, then loop through the remaining columns?
Replace: response = group1_responses{j}; with: response = group1_responses{j,i};

environ 22 heures ago | 0

Answered
i am not getting plot
lp seems to always be a 1-by-3 vector and p1 is a scalar. Therefore plot(p1,lp) creates three lines, each with one point. You ...

1 jour ago | 0

Answered
how to fix this error "Dot indexing is not supported for variables of this type"
It means kernel_param is not a struct. Here kernel_param is a struct, so it works fine: kernel_param = struct('nuser',0,'nmovi...

1 jour ago | 0

Answered
I need to format a text file
It's not clear whether you need any of those intermediate results or just the final result, but here's one way to do everything:...

1 jour ago | 0

| accepted

Answered
Update multiple values in a struct array
This works whether the field is a scalar in each element of S or not: S = struct('value',{[1 2 3] [2 3; 4 5] [] 6}); % initial ...

1 jour ago | 0

Answered
How to subplot 2 constellations with scatterplot (and NOT "scatter plot")
As far as I can tell, there is no way to use scatterplot to create a scatter plot in a subplot (or in any axes other than the on...

1 jour ago | 1

| accepted

Answered
Does MatLab designer support inserting Text fields and CheckBoxes inside a ListBox?
As far as I know, there is no support for nested controls. Maybe using a uitable would work for what you want to do (synchroniz...

1 jour ago | 0

Answered
How can I change the numbers to negative without altering the positive ones and make a sum of that? This is the serie 1-2+3-5+8-13+21-34+...
n=8; F=[1 2]; % suma=0; for i=3:n F(i)=F(i-1) + F(i-2); end disp(F) F(2:2:end) = -F(2:2:end) cumsum(F) sum(F)

2 jours ago | 0

| accepted

Answered
Scatter plot with strings on x axis
sites = compose("%s%d",["J" "Ju" "P" "R" "S" "W"].',1:5).'; sites = sites(:); sites([12 14]) = []; n_sites_per_group = [5 5...

2 jours ago | 0

Answered
How to Plot data groups with different colors?
One way is to plot one line per depth interval, each with a different Color/MarkerFaceColor: % first, I make up some random dat...

2 jours ago | 0

| accepted

Answered
Selecting rows periodically from csv data file.
You can read the whole thing using, for instance, readtable t = readtable('test.csv'); or readmatrix M = readmatrix('test.csv...

2 jours ago | 0

Answered
fgetl - still a valid function?
Yes, fgetl is still a valid built-in MATLAB function. (Notice, the error message says, "error in fgetl (line 32)", so you know ...

2 jours ago | 2

| accepted

Answered
How can I write both alphabets and numbers in .mat file on same cell?
If I understand the situtation, you have a mat file with some variables and you want to write those variables' names and values ...

2 jours ago | 0

Answered
Edit field numeric appdesigner
Yes. You can have two uilabels associated with that NumericEditField, one uilabel with Text 'Distance :' to the left of the Nume...

2 jours ago | 0

Answered
Matlab Linux Dual Monitor Issue
Maybe explicitly set the Position of the output figure(s). Check the MonitorPositions that MATLAB is using: get(groot(),'Monit...

2 jours ago | 0

Answered
Index in position 1 is invalid. Array indices must be positive integers or logical values.
t(1) is 0 t=0:0.01:1; t(1) and 0 is not a valid index in MATLAB f_m = [1 2]; f_m(t(1)) It looks more like you're using f_m...

2 jours ago | 0

Answered
Plotting boxplots at specific x axis locations over other data
You can specify the locations of the boxplots in the x direction using the 'Positions' argument: ROSdata = readtable('ROS_data....

2 jours ago | 1

| accepted

Answered
Index exceeds the number of array elements. Index must not exceed 2.
This error happens because t has only two elements, so there is no element t(3). How to fix it depends on what the code should ...

2 jours ago | 1

Answered
I don't know where my code is wrong
This line: height=2*(ycm+zcm*tan(theta(i)); % 1 2 3 21 is missing a close parenthesis ) somewhere.

2 jours ago | 1

Load more