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

etwa 7 Jahre vor | 0

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

etwa 7 Jahre vor | 0

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

etwa 7 Jahre vor | 0

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

etwa 7 Jahre vor | 1

| akzeptiert

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

etwa 7 Jahre vor | 1

| akzeptiert

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

etwa 7 Jahre vor | 0

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

etwa 7 Jahre vor | 0

| akzeptiert

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

etwa 7 Jahre vor | 0

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

etwa 7 Jahre vor | 0

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

mehr als 7 Jahre vor | 1

| akzeptiert

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

mehr als 7 Jahre vor | 1

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

mehr als 7 Jahre vor | 0

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

mehr als 7 Jahre vor | 0

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

mehr als 7 Jahre vor | 0

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

mehr als 7 Jahre vor | 0

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

mehr als 7 Jahre vor | 0

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

mehr als 7 Jahre vor | 0

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

mehr als 7 Jahre vor | 0

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

mehr als 7 Jahre vor | 0

| akzeptiert

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

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
string to text file
Take a look here for ways to write data in variables to text files.

mehr als 7 Jahre vor | 0

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

mehr als 7 Jahre vor | 1

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

mehr als 7 Jahre vor | 0

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

mehr als 7 Jahre vor | 0

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

mehr als 7 Jahre vor | 0

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

mehr als 7 Jahre vor | 0

| akzeptiert

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

mehr als 7 Jahre vor | 0

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

mehr als 7 Jahre vor | 0

| akzeptiert

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

mehr als 7 Jahre vor | 1

| akzeptiert

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

mehr als 7 Jahre vor | 1

| akzeptiert

Mehr laden