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
I need to pass from a text file to a matrix in Matlab
You say you want a matrix that contains stuff like the number 6 as well as the string "Ben" (or the character array 'Ben'). That...

alrededor de 13 horas ago | 0

| accepted

Answered
I can't get input a trigonometric expression
u = input('Enter the function to be integrated: ','s'); f = str2func(['@(x)' u]);

alrededor de 14 horas ago | 0

Answered
Accounting for the missing string using the number zero
Here's a way to do what I think you want to do, with minimal changes to your code (although I added some comments about some thi...

alrededor de 16 horas ago | 1

| accepted

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

alrededor de 17 horas 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...

alrededor de 18 horas 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...

alrededor de 19 horas 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");...

alrededor de 20 horas ago | 0

| accepted

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

alrededor de 20 horas ago | 0

| accepted

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

alrededor de 20 horas 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))...

alrededor de 21 horas 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); ...

alrededor de 21 horas ago | 1

| accepted

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

1 día 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};

1 día 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 ...

2 días 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...

2 días 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:...

2 días 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 ...

2 días 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...

2 días 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...

2 días 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 días 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...

3 días 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...

3 días 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...

3 días 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 ...

3 días 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 ...

3 días 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...

3 días 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...

3 días 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...

3 días 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....

3 días ago | 1

| accepted

Load more