Domanda


How to produce graphs out of the following code?
The cost matrix stands for the connectivity and the distances among nodes. % cost=[ x x x 0 0 0 % 0 x 0 0 0 0 % 0 0 x...

oltre 6 anni fa | 1 risposta | 0

1

risposta

Domanda


Replace repeated pattern in text
I wrote the following code for a file that I attach, but it is not working. filecontent = fileread('C:\Users\User\Desktop\D...

oltre 6 anni fa | 1 risposta | 0

1

risposta

Domanda


What wrong with the code?
I want to create a data structure to find unique unsorted values, from an initial vector. I am doing something wrong. y = ...

oltre 6 anni fa | 1 risposta | 0

1

risposta

Domanda


Close MATLAB from the keyboard
I would like to save a file or close it automatically by running a command. Something like: keyboard ("EXIT")

oltre 6 anni fa | 3 risposte | 0

3

risposte

Domanda


Strfind to contain complex pattern
I have created the following program to search for sentences. I want to include those that only begin with vowels. a = 'Jo...

oltre 6 anni fa | 1 risposta | 0

1

risposta

Domanda


Problem with reading text file and making changes
I have a file in a txt format with the following data 0 584547.75 4052042.76 1 584543.25 4052030.13 2 584542.06 40520...

oltre 6 anni fa | 2 risposte | 0

2

risposte

Domanda


What is wrong with the code?
I want to remove the vowels and I am doing something wrong. chr = 'The fast black dog' for i = 1:length(chr) if c...

oltre 6 anni fa | 1 risposta | 0

1

risposta

Risposto
Problem with reading text file and making changes
I have found the answer: M = dlmread('C:\Users\G\Desktop\topo.txt',' '); %replace path as appropriate M(:,1) = [] dl...

oltre 6 anni fa | 0

| accettato

Domanda


What is wrong with code?
I want a matrix as follows: n = 12 b = zeros(n,n) b(1,:) = 1:n b(2,:) = 1:n.^2 etc... How can I express th...

oltre 6 anni fa | 1 risposta | 0

1

risposta

Domanda


How to sum the digits of a string?
I have created the following program to sum the digits of a number, that derives from the following expression: op = 2^n, where ...

oltre 6 anni fa | 1 risposta | 1

1

risposta

Domanda


How can MATLAB find and replace a word in a text that contains multiple lines?
E.g. if there is a text file with 57 lines and I want a small change of a word in line 54.

oltre 6 anni fa | 1 risposta | 0

1

risposta

Domanda


Can I manipulate an existing Excel file through MATLAB?
I have an existing Excel file that has several mathematical operations into it. I want to insert several values through MATLAB, ...

oltre 6 anni fa | 0 risposte | 0

0

risposte

Domanda


Turning a row matrix of numbers into a row matrix of vectors.
I want to do something like this: I have the following matrix: A = [1 5 7] I want to turn it into: Anew = [1:6 (...

oltre 6 anni fa | 0 risposte | 0

0

risposte

Domanda


Square matrix with relationships among equal rows.
I have a matrix with the following form: A = [ 9 9 9; 5 6 5; 9 9 9; 4 4 2; 5 6 5; 5 6 5; 4 4 4; 9 9 9] If a particular...

oltre 6 anni fa | 3 risposte | 0

3

risposte

Domanda


I have three columns containing data. I want to isolate particular data depending on the third column and find the maximum values on the second column for each case of the isolated data from the third column.
I have a matrix with the following form: A = [1 2 3; 2 2 6; 0 1 3; 0 4 3] I want for each unique case from the third c...

oltre 6 anni fa | 1 risposta | 0

1

risposta

Domanda


What is a code to remove elements that are identical between each other, in the 2 columns in a nx2 matrix?
If I have a matrix like: A = [2 5; 5 6; 1 1; 2 2; 4 8; 2 6; 3 3] What is a generalized code to remove the element...

quasi 7 anni fa | 0 risposte | 0

0

risposte

Domanda


How do I break a complex loop with a multiple-if structure?
I am writing a code that has the following form: for i = 1:size(interiorcolumns,1) if interiorcolumns{i}(6) == height...

quasi 7 anni fa | 2 risposte | 0

2

risposte