Answered
Convert to Histogram figure
You might try something like this: % first, re-creating something like your xz and yz: pd = makedist('Normal',2300,100); xz =...

4 years ago | 0

Answered
Combining multiple existing plots
You can try doing something like what follows. This assumes each figure has one axes and you want to put all graphics objects fr...

4 years ago | 1

Answered
Error in imread (line 343) [fid,errmsg] = fopen(filename, 'r'); Error in calistir (line 6) A = imread( fullfile(datapath, TestImage));
Let's check what fullfile() returns with the input arguments you have there: datapath = ('C:\Users\Lenovo\Desktop\DATASET'); T...

4 years ago | 0

Answered
string output in text-file without " " (quotation notes). MATLAB BUG? comma in string effects quotation notes in .txt-file
You can use "QuoteStrings","none" in your call to writematrix() to avoid writing the double-quotes in either case: Name1 = "Wal...

4 years ago | 5

| accepted

Answered
Can you set struct to always display dimensions instead of field values?
I don't know if there's a setting to control that, but you can always write your own function to do it. Here's one you might tr...

4 years ago | 0

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

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

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

4 years ago | 0

| accepted

Answered
What version MATLAB can i run?
Given those specs looks like any recent release will be ok. You can have a look here for the system requirements for the latest...

4 years 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(...

4 years ago | 0

| accepted

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','w'); fprintf(fileid,'%f\n',data_...

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

4 years 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,'_',...

4 years ago | 2

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

4 years 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'); ...

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

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

4 years 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(...

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

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

4 years 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');

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

4 years ago | 0

| accepted

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

4 years 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),...

4 years 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 = ...

4 years 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,:})

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

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

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

4 years ago | 0

| accepted

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

4 years ago | 0

| accepted

Load more