답변 있음
Plot data from two columns in csv
data = csvread ('eegID.csv',1); col1 = data(:, 1); col2 = data(:, 2); plot(col1, col2) csvread cannot read non-numeric chara...

6년 초과 전 | 0

답변 있음
Write cell array with multiple elements in the cell to Excel File
xlswrite is not going to write multiple contents of a single cell because an Excel cell can only contain one piece of informatio...

6년 초과 전 | 0

답변 있음
How do i tell the player they already guessed a number?
I would suggest keeping an array of the guessed values, and then checking if the number exists in that array. % Outside the loo...

6년 초과 전 | 0

답변 있음
Moving sum in a timetable
I'm a little bit confused what you're asking for, but here is a first attempt. As I understand you are looking for each row to h...

6년 초과 전 | 1

| 수락됨

답변 있음
Change the time format ?
I'm assuming that you have an array of doubles. This works fine for the inputs, but will not be possible with the outputs. I am ...

6년 초과 전 | 1

| 수락됨

답변 있음
How to change precision in plot?
The values aren't actually rounding up, that's a matter of display precision. This is a guide that should help you customize it....

6년 초과 전 | 0

답변 있음
how to store all values of a matrix variable during the loop
You need to add indexes to your outputs. Typically, it is usually appropriate to use your loop index value as the index, however...

6년 초과 전 | 0

| 수락됨

답변 있음
Import CSV file using readtable gives wrong date time format.
In 'newer' versions of Matlab (sorry, I don't know when this started) it is possible to define a datetime format as a named card...

6년 초과 전 | 0

답변 있음
Plotting multiple inputs on a single figure
I you are looking for separate plots like that I would suggest using subplot. This will allow you to present multiple plots in o...

6년 초과 전 | 0

답변 있음
Read every nth line of text file with different deliminters across a single line
You might have an easier time using textscan instead of fgets or dlmread. You have to specify your format for a row, but that sh...

6년 초과 전 | 1

| 수락됨

답변 있음
how to select from identical rows based on their associated value in one column?
There might be some fancy function I don't know, but it's certainly possible to do this with a loop. I cannot comment on the spe...

6년 초과 전 | 1

답변 있음
Code that makes matlab jumping loops without fininishing the remaining iterations.
I'm not entirely sure I understand what you're asking for, but it seems like you want to run all iterations of the d loop with t...

6년 초과 전 | 0

답변 있음
Could you please correct my program for single variable but different size and many outputs.
You are losing the different values of A because you are overwriting the value each time you run a new calculation. The way to p...

6년 초과 전 | 0

답변 있음
Guess my favourite colour!
You are going to have several problems with doing any kind of comparison of the color answers to make them relate to numbers. Th...

6년 초과 전 | 0

답변 있음
How to extract specific text (eg. serial number) from single/multiple text file
It is possible to use find or strcmp, but I think your best bet for this is to use regexp. If the serial number is in a consiste...

6년 초과 전 | 0

답변 있음
Writing a script to take a text file and display the second word in each even numbered row
One of the simplest ways to do this is by looping through each line with fgetl, and splitting the appropriate lines with regexp....

6년 초과 전 | 0

답변 있음
Program that can take three lines input by the user running the code, and saves those lines of text in a text file
There are a couple of different ways of doing this, mostly based on how much you trust the user to put things in correctly. The...

6년 초과 전 | 0

답변 있음
Excel (.csv) error: "Excel Worksheet could not be activated.""
A .csv file is not actually an excel format, although it can be opened with excel. I would suggest using csvread() instead, as i...

거의 7년 전 | 0

답변 있음
Naming new sets of data in for loop and dividing matrixes.
Why not just load the data into a third dimension from the beginning? for p = -10:10 filename = strcat('mea...

거의 7년 전 | 0

| 수락됨

답변 있음
Hello everyone, help for consolidation of numbers
One convoluted way of doing this would be to convert to strings and back. for i = 1:length(A)/3 B(i) = str2num([num2str(A(...

거의 7년 전 | 0

| 수락됨

답변 있음
string to text file
Take a look here for ways to write data in variables to text files.

거의 7년 전 | 0

답변 있음
create table that count the composition of two categories.
Loading things with one command is generally always preferred, so yes, combining them into a 562x2 array is helpful. As for the...

거의 7년 전 | 1

답변 있음
Extracting two-dimensional data matrix from .csv into individual variables
I'm not sure I entirely understand what you're trying to accomplish so I'm going to break things down. Feel free to let me know ...

거의 7년 전 | 0

답변 있음
how to delete rows from a struct array?
vars = vars([vars.class] == 'double'); This may not work exactly (I think you might need to use strcmp instead of ==, but it sh...

거의 7년 전 | 0

답변 있음
How do I create an excel file from a cell array that actually displays all the information in each colum?
I would suggest reformatting your data first, so that you have everything in the upper level of cells. for i = 1:size(result) ...

거의 7년 전 | 0

답변 있음
How to edit text file in matlab?
I don't know that it is worth the effort to actually edit a text file with MATLAB, but it is certainly possible to read it, edit...

거의 7년 전 | 0

| 수락됨

답변 있음
How to replace array values that meet condition?
I'm assuming B_1 should be the same size as B? Does order matter? If order doesn't matter: A = [3 4 5]; B = [4 6 3]; B...

거의 7년 전 | 0

답변 있음
How to run completely a loop inside one other?
I suspect that the issue is not that the code actually stops, but that the results are only recorded for one internal loop. If y...

거의 7년 전 | 0

| 수락됨

답변 있음
Adding an outer for loop for a plot
eta = [5.4 6.7 5.2]; hold on for i = 1:length(eta); eta_c = 0.6; rpf = eta(i)/eta_c; count = 0; for x = 1:...

거의 7년 전 | 1

| 수락됨

답변 있음
Error in my "for" loop?
Currently your 'first' loop only loops through one set of indices, but you want it to loop through all c, s, and t values indivi...

거의 7년 전 | 1

| 수락됨

더 보기