Community Profile

photo

_


Last seen: Today|Active since 2013

Statistics

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

View badges

Content Feed

View by

Answered
Remove duplicates per row
A = [1 1 2; 1 2 2; 3 2 3]; A = num2cell(A,2); B = cellfun(@unique,A,'UniformOutput',false); try B = cell2mat(B); catch ...

15 hours ago | 0

|accepted

Answered
Error that does not make sense.
Is it possible there is another crack_code.m that supercedes this one on the path so that that other one is being called instead...

17 hours ago | 1

Answered
Modifying the elements of matrix from indices (MATLAB)
Here is a function you can use to get a pair of random indices that sum to m but are never [m/2 m/2]: function idx = get_random...

17 hours ago | 0

|accepted

Answered
What version MATLAB can i run?
考虑到这些规范看起来像任何最近发布will be ok. You can have a look here for the system requirements for the latest...

19 hours ago | 0

|accepted

Answered
Regarding 3d plot color
Looks like you might want to set the 'EdgeColor' to 'none' figure() surface(1:1000,1:1000,randn(1000)) view([30 60]) figure(...

19 hours ago | 0

Answered
Extracting unique rows from cell array Matlab 2015a
If the question is how to reorder the rows of data to get the expected output, you can do this: [~,~,data] = xlsread('dataset.c...

20 hours ago | 0

Answered
Exporting Edited Data to Notepad in Appdesigner
In order to write to a file you will say something like: fileid = fopen('text_file_name.txt'); fprintf(fileid,'%f\n',data_to_w...

20 hours ago | 0

Answered
Use uieditfield.ValueChangedFcn to change uieditfield.value by same amount
It sounds like what's going on is that the ValueChangedFcn does not execute when the uieditfield's Value does not change. So you...

20 hours ago | 0

Answered
How to draw a "xline" with a given height for the line and a given vertical position for the text?
Here's how you can specify the Vertical and Horizontal Alignment of the xline's label: warning off all figure(); xline(1,'_',...

21 hours ago | 1

Answered
How to get more than 1 ans
You need to assign those other outputs to variables in order to see them. So on the command line or in an m-file you would say s...

21 hours ago | 0

Answered
How to 'flip/reverse' the signal?
load('data.mat') hold on for i = 1:length(S_or_z_cycle) if mean(S_or_z_cycle{i}) > 0 plot(S_or_z_cycle{i},'r'); ...

1 day ago | 0

|accepted

Answered
How to combine multiple tables from diffrent folders and save as on table?
t = {}; for k = 1:numel(file_list) if isempty(file_list{k}) continue end disp(file_list{k}.name) A...

1 day ago | 0

|accepted

Answered
Getting error In SMOTE
It sounds like you are attempting to run func_smot.m by clicking the green arrow or hitting F5, but you mean to be running mySMO...

1 day ago | 0

|accepted

Answered
Shuffle stumuli so that ones that contain same characters in the name do not repeat consequently
Seems like that should work. Why do you say you still get repetitions? files = repmat(sprintfc('file%d',1:5),1,2); disp(files(...

1 day ago | 0

Answered
How do I change my code so that the array varOut prints duplicates as well?
array = randi([-10, 10], 10, 1) varIn = array; varOut = []; while (length(varIn) > 0) % use the 2nd output argument from...

1 day ago | 0

|accepted

Answered
Legend isn't including all entries
There are a couple of different things you can do, depending on what your objective is. See Approach 1 and 2 below: % making up...

1 day ago | 0

|accepted

Answered
plotting a CDF with 2 logs axis
load('Q.mat') idx = Q>0.5; cdfplot(Q(idx)); set(gca(),'XScale','log','YScale','log');

1 day ago | 0

Answered
How to repeat element of array to complete Specific shape In matlab
You can use repmat() to replicate the array (or repelem() to repeat each element of the array) enough times to get at least 1000...

1 day ago | 0

Answered
Extracting a set of rows and columns from a text file
This may work fid = fopen('sample.txt'); str = fread(fid,'*char').'; fclose(fid); info = regexp(str,[ ... 'PRESSURE C...

1 day ago | 0

|accepted

Answered
Replace sub matrices in the correspondant matrix (MATLAB)
m=4; P=hankel(1:m,m:-1:1); a = zeros(m-1,m-1,m); a(:,:,1) = eye(m-1); for k = 2:m-1 a(:,:,k) = circshift(a(:,:,k-1),...

2 days ago | 0

|accepted

Answered
why do i get last value of loop?
Is this what you want to do? clc clear % In = input;%this is my data In = [2 3 4]; % using some arbitrary values tms = ...

2 days ago | 0

|accepted

Answered
Get maximum value for a row in a MATLAB table
t = table(randn(10,1),randn(10,1)) i = 5; % maximum value of row i in table t: max(t{i,:})

3 days ago | 0

Answered
How to create a circle when its center is located (15, 4.5) and its radius is 5?
Here's one way: t = linspace(0,2*pi,100); % make a function that calculates the (x,y) points along a circle with % radius r...

3 days ago | 0

Answered
Why am I not getting an array of values?
Use element-wise division, ./ n = -7:7; % an array of 1x15 p = (pi*n/2); h = sin(pi*n/2)./(pi*n/2) % this becomes an array...

3 days ago | 0

|accepted

Answered
What is the best way to count occurrences of data from an excel file?
There are different ways to read an excel doc, and the function you use might treat some things differently (in particular, the ...

3 days ago | 0

Answered
Extracting information from multiple tables within a cell to plot
% load data and plot: load('matlab.mat'); figure(); hold on table_heightsPR = cellfun(@height,ArrayPR); height_thresh...

3 days ago | 0

|accepted

Answered
How to acess data if its in cell form?
Use curly braces { } to access the contents of tables T = table( ... {'patient1';'patient2';'patient3'}, ... [25;45;1...

4 days ago | 0

Answered
Find heights of tables within an MxN cell
load('matlab.mat'); table_heights = cellfun(@height,ArrayPR); disp(table_heights)

4 days ago | 0

|accepted

Answered
Difficulty using 'readvars' function in a loop with different dimensions of data in the files
I'm unable to reproduce the error with readvars itself, but I can generate that error on the same line as where readvars is used...

4 days ago | 0

|accepted

Answered
Add push button to GUI to be able to change image for color thresholding in image processing and save button to save images
When the function Pushbutton is executed, the selected file is read and new images are created in each of the two axes, using im...

4 days ago | 0

Load more