StefBu
Followers: 0 Following: 0
Feeds
문제를 풀었습니다
Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...
4년 초과 전
문제를 풀었습니다
Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...
4년 초과 전
문제를 풀었습니다
Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.
4년 초과 전
문제를 풀었습니다
Get the length of a given vector
Given a vector x, the output y should equal the length of x.
4년 초과 전
문제를 풀었습니다
Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...
4년 초과 전
문제를 풀었습니다
Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...
4년 초과 전
문제를 풀었습니다
Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...
4년 초과 전
답변 있음
Table - Write results in a new rows
Hi, you can create a cell array and then add a new row to your table by concatenation. For example if your table variables are ...
Table - Write results in a new rows
Hi, you can create a cell array and then add a new row to your table by concatenation. For example if your table variables are ...
대략 5년 전 | 0
답변 있음
save matfile with current time stamp
Hi, you have to concatenate the string first and add the fileending. Try this: save (['C:\dannyuser\project', optimization, dat...
save matfile with current time stamp
Hi, you have to concatenate the string first and add the fileending. Try this: save (['C:\dannyuser\project', optimization, dat...
대략 5년 전 | 0
답변 있음
convert cell in minutes to seconds vector
Hi try this: seconds = zeros(size(time)); for i = 1:size(time,2) seconds(i) = time{i}(1,1)*60 + time{i}(1,2); end Greet...
convert cell in minutes to seconds vector
Hi try this: seconds = zeros(size(time)); for i = 1:size(time,2) seconds(i) = time{i}(1,1)*60 + time{i}(1,2); end Greet...
대략 5년 전 | 0
답변 있음
I have 200 files with 20 columns each. The 1st column remains the same for all files. I want to sum up all 2nd columns from 200 files, .....20th columns from 200 files. I want the first column to remain the same.
Hi you have to use a for-loop to access your data and then add up the colums. First use dir to get your files files = dir('C...
I have 200 files with 20 columns each. The 1st column remains the same for all files. I want to sum up all 2nd columns from 200 files, .....20th columns from 200 files. I want the first column to remain the same.
Hi you have to use a for-loop to access your data and then add up the colums. First use dir to get your files files = dir('C...
대략 5년 전 | 0
답변 있음
Multiple bar plots and error bars
Hi, you can use the functions bar and errorbar. Plot your Mean-Data with bar and your standard deviation with errorbar. Gre...
Multiple bar plots and error bars
Hi, you can use the functions bar and errorbar. Plot your Mean-Data with bar and your standard deviation with errorbar. Gre...
대략 5년 전 | 0
문제를 풀었습니다
Read a column of numbers and interpolate missing data
Given an input cell array of strings s, pick out the second column and turn it into a row vector of data. Missing data will be i...
대략 5년 전
답변 있음
File Names inside a folder(x) and subfolders of(x)
Here you go: Path = 'C:\Users\' % wherever you want to search searchPath = [Path ,'\**\*.csv']; % Search in folder and s...
File Names inside a folder(x) and subfolders of(x)
Here you go: Path = 'C:\Users\' % wherever you want to search searchPath = [Path ,'\**\*.csv']; % Search in folder and s...
대략 5년 전 | 1
| 수락됨
답변 있음
how can I preallocate for speed in a loop?
Hi. Since x_p grows in each iteration of your for-loop you can easily define its size at the begining. Just use this before you...
how can I preallocate for speed in a loop?
Hi. Since x_p grows in each iteration of your for-loop you can easily define its size at the begining. Just use this before you...
대략 5년 전 | 1
| 수락됨
답변 있음
Using Matlab App Designer with 2 Dependent Pop Up Menus
You can do this by using a callback on changinge the value in your first drop down. All the magic is done in function DropDown...
Using Matlab App Designer with 2 Dependent Pop Up Menus
You can do this by using a callback on changinge the value in your first drop down. All the magic is done in function DropDown...
대략 5년 전 | 1
| 수락됨
답변 있음
How to get the relsults in different matrix after for loop
Hi if you really want to use eval,try this code: for i=1:3 tempName = ['A', num2str(i)]; eval([tempName '= B*i +C*i;...
How to get the relsults in different matrix after for loop
Hi if you really want to use eval,try this code: for i=1:3 tempName = ['A', num2str(i)]; eval([tempName '= B*i +C*i;...
대략 5년 전 | 1
답변 있음
how to extract data based upon latitude longitude value form a matrix file
Hi. First of all you have to tell us how the data is organized inside the .mat file. Greetings Stefan
how to extract data based upon latitude longitude value form a matrix file
Hi. First of all you have to tell us how the data is organized inside the .mat file. Greetings Stefan
5년 초과 전 | 0
| 수락됨
답변 있음
Search number in one cell of a csv file
Try this code. It should work for you. If not feel free to ask. Greetings Stefan % Get data from cell head = header{1,1}{1,...
Search number in one cell of a csv file
Try this code. It should work for you. If not feel free to ask. Greetings Stefan % Get data from cell head = header{1,1}{1,...
5년 초과 전 | 1
| 수락됨
답변 있음
Move select data out of a structure
How are your double values organized inside the structure fields? In cells,etc....?
Move select data out of a structure
How are your double values organized inside the structure fields? In cells,etc....?
5년 초과 전 | 0
답변 있음
how can i split 30*9 matrix into 20*9 and 10*9?
Hi, you can use this two lines. X_1 = X(1:20,:) X_2 = X(21:end,:) Greetings Stefan
how can i split 30*9 matrix into 20*9 and 10*9?
Hi, you can use this two lines. X_1 = X(1:20,:) X_2 = X(21:end,:) Greetings Stefan
5년 초과 전 | 1
| 수락됨