Community Profile

photo

Benjamin


Last seen: Today 2013 이후 활성

Statistics

All
  • Treasure Hunt Participant
  • Thankful Level 1
  • Revival Level 4
  • Commenter
  • Leader
  • Pro
  • Knowledgeable Level 4
  • Promoter
  • Scholar
  • 3 Month Streak
  • CUP Challenge Master
  • Introduction to MATLAB Master

배지보기

Content Feed

보기 기준

답변 있음
How to get average for each row in a cell array containing multiple matrices?
load('Hurst.mat'); To average the matrices in each cell in Hurst: cellfun(@mean,Hurst) To average the matrices in each cell i...

약 4시간 전 | 0

답변 있음
How to make a function generate random outputs using variables with given values?
t = linspace(0,2.*pi,1000); x = 4.*cos(t).*sin(2.*t).*cos(10*t); y = 7.*sin(t).*cos(3.*t); z = t; N = 3; figh = zeros(1,N);...

1일 전 | 0

답변 있음
Extracting the mean of 2nd column based on unique 1st column values.
Here are two similar methods that produce identical results: SINR_tmp = [ ... 1 22.6391; ... 1 22.6357; ... 1 22...

1일 전 | 0

| 수락됨

답변 있음
using accumarray to combine text
Does this do what you want? tdata = table([ 1 2 2 3 4 2]', ["a","b","c","d","e","f"]', 'VariableNames',{'EBID','Name'}); [uniq...

1일 전 | 0

답변 있음
Question about using ismembertol function
Note that 10e-3 = 1e-2. Maybe that is the problem A=[11538.0882247944, 21569.4133365453] B=[11537.6120343925, 21611.5704794796...

2일 전 | 0

답변 있음
How to filter data from columns and extract corresponding x-values in excel files?
Here are some ways to do this, depending on exactly what you want to do. "Filtering" on column B only: % data = xlsread('Sampl...

3일 전 | 1

| 수락됨

답변 있음
Delete m consecutive rows every n rows
Here's one way to do it, with a matrix. The logic would be the same for a table. m = 6; n = 24; N = 87; data = (1:N).'+(0:...

3일 전 | 1

| 수락됨

답변 있음
How to use variable names/strings in a For cycle
Here is how you can do it: matrix = magic(5); for i = 1:5 eval(['B' num2str(i) '=matrix(:,' num2str(i) ');']); end wh...

3일 전 | 0

답변 있음
how to generate ramp signals at different sampling frequencies.
fs1 = 10; % sampling frequency 10 Hz (very low, so the individual samples can be seen in the plot) t1 = -1:1/fs1:1; r1 = t1.*(...

3일 전 | 0

답변 있음
Incorrect number of input arguments
It doesn't make sense to pass your legend to the title() function. You can remove it: lgd_1 = legend(app.UIAxes,'dTdhw(°C)','VD...

3일 전 | 0

| 수락됨

답변 있음
Research of an element in an array
Perhaps you mean to do this: disp ('Ricerca elemento X nel vettore somma S') X=input ('X'); K = find(S==X); if ~isempty(K) ...

3일 전 | 0

| 수락됨

답변 있음
How to create an output excel file after using uitgetfile to select multiple files?
Collect each file's "Sum" in a cell array inside the loop, and then write it to file after the loop: [file_list,path_name] = ui...

3일 전 | 0

| 수락됨

답변 있음
Auto Detect different file types?
Since the only difference between the way the two file types are read with readtext() is the delimiter, you can try different de...

3일 전 | 1

| 수락됨

답변 있음
Reading all values as a string from excel file
Maybe you can just convert the decimal times to datetimes using the datetime() function, after reading them in. now() datetime...

4일 전 | 0

답변 있음
Crop image from imagesc, after creating the image.
You can set the axes YLim to the relevant part. In your case: set(gca(),'YLim',[-1 0]);

4일 전 | 1

답변 있음
How can I add string character description in the X axes instead of numbers? Is there a way to enhancer this code?
Something like this? clear all; %get rid of everything in memory close all; %close all open figures %X axis Test_Cases = { '...

4일 전 | 0

| 수락됨

답변 있음
How to perform division correctly?
It's not because of division, per se, but because of floating-point arithmetic. No division here: a = 3*0.3; b = 0.9; a ==...

4일 전 | 0

답변 있음
Delete Output_Fcn in GUI
The outputFcn is for returning a handle to your figure (and additional outputs if you like), so you can call your m-file like th...

4일 전 | 0

| 수락됨

답변 있음
How to draw voronoi diagram population of country(Numerical one axis data) with name of country with Excel data.
Voronoi diagram is 2D. I don't know where you're going to get a second numeric axis. Using an index isn't very interesting. vor...

4일 전 | 0

| 수락됨

답변 있음
plotting a 2D line plot using data with 3 variables
Is something like this what you want to do? % 100 depth values: depth = 100:199; % 14 sediment diameter values: diameter = l...

4일 전 | 0

답변 있음
Error using reshape function when trying to split columns into equally sized columns in new cell array
The N's are not being calculated correctly, because this line is incorrect: N = block_size*ceil(numel(participants{j},1)/block_...

4일 전 | 1

| 수락됨

답변 있음
How to find the mode of an array?
One thing you can do is set your inner loop ('b' loop) to start at the index one after the current value of a. This way you neve...

5일 전 | 0

| 수락됨

답변 있음
Organize the logic to transform given matrix into required
A = [1 5 4 5 7; 2 5 5 5 8; 3 5 6 5 9] B = A.'; % transpose B = B(1:2:end,:) % take every alternate row, starting with 1st Or:...

5일 전 | 0

| 수락됨

답변 있음
How to extract data for some particular region from 1 dimenational satellite data (spatial)
load('sat_data.mat') whos() w idx = inpolygon(lon,lat,w.X,w.Y); scatter3(lon(idx),lat(idx),xch4(idx))

5일 전 | 0

답변 있음
Organize the logic to transform given matrix into required:
A = reshape(1:9,3,[]).' B = triu(A); B(1:size(A,1)+1:end) = -1

5일 전 | 0

| 수락됨

답변 있음
Replacing text with value
A1 = 'A':'O' A2 = 1:15 r = 'AE'; [~,idx] = ismember(r,A1); s = A2(idx)

5일 전 | 0

| 수락됨

답변 있음
can deployed application run the 'run' function?
Unfortunately, run() is not supported in deployed applications. <https://www.mathworks.com/help/compiler/unsupported-function...

5일 전 | 0

| 수락됨

답변 있음
How to write struct back to h5 file
This is a partial answer, at best. But here's how you can modify the 'index' member of the 'table' dataset in that .h5 file, und...

5일 전 | 0

| 수락됨

답변 있음
How to quickly "plug in" numerical values into symbolic equations to get a numerical result
You can use subs() to do that. It will evaluate yt1 and give you a symbolic value, on which you can use double() to convert to a...

5일 전 | 0

| 수락됨

답변 있음
I want to create a matrix combining 2 matrices. The new one must have from the diagonal up de elements of matrix A and from the diagonal down the elements of matrix B. Help
You can use triu() and tril() to get upper- and lower-triangular matrices, respectively, and logical indexing to combine them: ...

5일 전 | 1

| 수락됨

더로드