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

casi 7 años hace | 0

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

casi 7 años hace | 0

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

casi 7 años hace | 0

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

casi 7 años hace | 1

| aceptada

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

casi 7 años hace | 1

| aceptada

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

casi 7 años hace | 0

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

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 0

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

casi 7 años hace | 0

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

casi 7 años hace | 1

| aceptada

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

casi 7 años hace | 1

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

casi 7 años hace | 0

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

casi 7 años hace | 0

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

casi 7 años hace | 0

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

casi 7 años hace | 0

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

casi 7 años hace | 0

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

casi 7 años hace | 0

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

casi 7 años hace | 0

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

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 0

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

casi 7 años hace | 1

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

casi 7 años hace | 0

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

casi 7 años hace | 0

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

casi 7 años hace | 0

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

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 0

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

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 1

| aceptada

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

casi 7 años hace | 1

| aceptada

Cargar más