Community Profile

photo

Voss


Last seen: 1일 전 2013 이후 활성

Statistics

All
  • MATLAB Central Treasure Hunt Finisher
  • Treasure Hunt Participant
  • 12 Month Streak
  • Thankful Level 4
  • Commenter
  • Leader
  • Ace
  • Revival Level 4
  • Knowledgeable Level 5
  • Promoter
  • Scholar
  • CUP Challenge Master

배지보기

Content Feed

보기 기준

답변 있음
How can I convert 5.000000e-01 to 0.5 in Matlab? Please help. Thank you so much.
format longE 0.5 format longG 0.5 Documentation: format

1일 전 | 0

답변 있음
Browsing through figures, without opening them all
You can use load to inspect .fig files programmatically: f = figure(); plot(1:10,'ButtonDownFcn','disp(''ok'')'); saveas(f,'1...

1일 전 | 0

답변 있음
How to set y axis limit same for 2 subplots in a figure object?
Store the axes objects returned from subplot(), and then set their YLim: features = 99; for feature = 1:numel(features) h...

5일 전 | 0

답변 있음
Error using horzcat Dimensions of matrices being concatenated are not consistent.
Here's how you can add zeros to the beginning and end of your signal (with the extra zero going to the end in case the number of...

5일 전 | 0

| 수락됨

답변 있음
Hi, I have the following 1x10 matlab structure where all 10 elements are column vectors of varying sizes. Need to convert it to matrix as described below. Any help?
If S is your struct array and M is your matrix of zeros: for ii = 1:numel(S) M(ii,1:numel(S(ii).times)) = S(ii).times; en...

6일 전 | 1

| 수락됨

답변 있음
I'm trying to graph a function on an interval, and the graph either doesn't show up or is the wrong graph
x = linspace(-2,16,100); % y = (4*cos(x))./(x.*exp(x.*-0.75)); y = (4*cos(x))./(x+exp(x.*-0.75)); % ^ <---- h...

7일 전 | 0

답변 있음
Adding a string in front of every variable in a table
% read the table t = readtable('Ztable.xlsx','VariableNamingRule','preserve'); % modify the variable names t.Properties.Var...

7일 전 | 0

| 수락됨

답변 있음
Index exceeds the number of array elements. Index must not exceed 1.
This line: T=T(i) takes the ith element of T and stores it as T, after which T is a variable with one element. So any subseque...

8일 전 | 1

| 수락됨

답변 있음
help with smooth curve
Like this? x = 2:2:20; y = [1.23 0.95 1.1 1.44 1.47 1.1 1.21 1.4 1.1 1.39]*1e4; plot(x,y) x_new = 2:0.2:20; y_new = inter...

8일 전 | 0

답변 있음
Read a punch file
This may work: % read the file contents as a char vector: fid = fopen('sample.txt'); % (had to change extension to txt to uplo...

8일 전 | 0

답변 있음
Change axis color on parts of the mesh
Here's one way: [X,Y] = meshgrid(1:0.5:10,1:20); Z = sin(X) + cos(Y); C = 1 + (X <= 2 | X >= 9); surf(X,Y,Z,C) colormap([1 ...

9일 전 | 0

| 수락됨

답변 있음
I want to fix the zeros values in their same indices in certain two matrices A and B (to not be updated) in a cost function?
A = [0.1 0.2 0; 0.2 0.8 0; 0 0 0.7] newA = [1 2 3; 4 5 6; 7 8 9] idx = A == 0; A(~idx) = newA(~idx)

11일 전 | 0

답변 있음
Zero Matrix Values using Indices
Speed_ENU = [1,3,6,14,25,33; 11,12,15,45,15,67;1,32,16,4,25,3; 11,12,5,45,15,7;11,32,6,4,25,33; 1,12,5,44,15,67;11,31,6,4,25,3; ...

11일 전 | 0

| 수락됨

답변 있음
Create column into struct if 'if statement' met a condition
Here's one way: % construct a modified version of your variables: shape_area = [ ... struct('Geometry','Polygon','Column1...

12일 전 | 0

답변 있음
Requested 250000x250000 (931.3GB) array exceeds maximum array size preference
One of them is a 1x250000 row vector. You can transpose that one, or you can convert it (or both) to column vector(s): x1(:).*x...

12일 전 | 3

| 수락됨

답변 있음
extract numbers from a string.
str = '"sensor_serials": {"H1": "3637", "H2": "3638", "H3": "2787"}' numbers = regexp(str,'"(\d+)"','tokens'); numbers = [num...

15일 전 | 0

| 수락됨

답변 있음
How to remove a slash from fullfile?
Combine the 'MC_' and the i into a single argument. Like this: wtf= fullfile('C:\','Users','jessi','Desktop','HydrusMC','Simul...

15일 전 | 0

답변 있음
Replacing NaN with char
A = [1; 2; 3; NaN; 5; NaN;]; a = num2cell(A); a(isnan(A)) = {'Example'}; disp(a);

16일 전 | 0

| 수락됨

답변 있음
How to convert 3D cell of different dimensions to a single matrix
Maybe this does what you want: cat(3,hDp{:})

17일 전 | 0

답변 있음
checking folder has more than one file with similar name
% use the name of the folder you want to check: folder = './'; % get info about the files in that folder whose name starts w...

18일 전 | 0

| 수락됨

답변 있음
How do I access data inside a struct that is inside another struct that is inside a cell array
If B is the index of the struct you want in cell array A, C is a field of that struct, etc. A{B}.C.D

20일 전 | 0

답변 있음
How to extract particular row values from cell arrays with varying cell lengths?
N = numel(x.total_states); first_fragment_labels = cell(1,N); first_fragment_signal = cell(1,N); for ii = 1:N ...

21일 전 | 0

| 수락됨

답변 있음
How do I compare values within a for loop using if/else?
Seems like you want to compare one element of Vx and Vy at a time: if Vx(i,j,k) == Vy(i,j,k) disp('X = Y') elseif...

22일 전 | 1

| 수락됨

답변 있음
How can i open a list of files?
folder = 'Path\to\your\directory'; old_ext = '.txt'; % original extension new_ext = '.dat'; % new extension old_files = dir...

27일 전 | 0

답변 있음
Modifying MATLAB code according to conditions (MATLAB)
B = max(A); C = find( A == B , 1 ); Or [B,C] = max(A);

28일 전 | 0

| 수락됨

답변 있음
matrices specific value selection
Like this? % constructing your B.values B.values = cat(3,[ ... 92 99 1 8 15 67 74 51 58 40 ...

29일 전 | 0

| 수락됨

답변 있음
splitting Cell array in a loop
X = 1:32; Y = cell(1,4); j = [1,9,17,25]; for i = 1:numel(j) Y{1,i} = X(j(i):j(i)+7); end disp(Y) Or: Y = num2cell(...

29일 전 | 0

| 수락됨

답변 있음
Creating vector from a cloumn of a matrix
Transpose the column: RowMatrix = Matrix(:,1).' https://www.mathworks.com/help/matlab/ref/transpose.html

29일 전 | 0

| 수락됨

답변 있음
How to summation using for loop with a vector
"... not to sure how to make a for loop for SXY ..." The square brackets give you a syntax error: for [i = 100] Removing them...

29일 전 | 1

답변 있음
How can I find an specific value inside an array without using the find function?
You can use the max function with second output argument, applied to the logical array w>=10, in order to return the first index...

약 1달 전 | 0

| 수락됨

더로드