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

quasi 7 anni fa | 0

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

quasi 7 anni fa | 0

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

quasi 7 anni fa | 0

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

quasi 7 anni fa | 1

| accettato

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

quasi 7 anni fa | 1

| accettato

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

quasi 7 anni fa | 0

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

quasi 7 anni fa | 0

| accettato

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

quasi 7 anni fa | 0

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

quasi 7 anni fa | 0

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

quasi 7 anni fa | 1

| accettato

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

quasi 7 anni fa | 1

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

quasi 7 anni fa | 0

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

quasi 7 anni fa | 0

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

quasi 7 anni fa | 0

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

quasi 7 anni fa | 0

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

quasi 7 anni fa | 0

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

quasi 7 anni fa | 0

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

quasi 7 anni fa | 0

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

quasi 7 anni fa | 0

| accettato

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

quasi 7 anni fa | 0

| accettato

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

quasi 7 anni fa | 0

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

quasi 7 anni fa | 1

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

quasi 7 anni fa | 0

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

quasi 7 anni fa | 0

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

quasi 7 anni fa | 0

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

quasi 7 anni fa | 0

| accettato

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

quasi 7 anni fa | 0

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

quasi 7 anni fa | 0

| accettato

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

quasi 7 anni fa | 1

| accettato

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

quasi 7 anni fa | 1

| accettato

Carica altro