Réponse apportée
Can't seem to figure out how to begin on this project: Drawing circular shapes from a function that is created by connecting points.
I would start by calculating the theta vector for a shape with n+1 (hint) dots from 0 to 2pi from theta you can calculate x and...

plus de 7 ans il y a | 0

Réponse apportée
Creating the Snake Game using a class
To understand whats happening, lets build a small class with a function or two: classdef run methods function sta...

plus de 7 ans il y a | 1

Réponse apportée
How can I create a new matrix by using existing values in a column?
B=[0.100;0.250;0.200;0.120;0.080;0.060;0.055;0.040;0.020]; n = length(B); % prepare indices idx = 0:(length(B)-1); % spl...

plus de 7 ans il y a | 1

Réponse apportée
How to add string to the beginning of each element in a string array?
strcat('Syl_', s1) ans = 1×4 string array "Syl_1" "Syl_2" "Syl_3" "Syl_4"

plus de 7 ans il y a | 2

| A accepté

Réponse apportée
How do I filter my data points without using smoothdata?
Some smoothing methods rely on fitting a moving curve to a small window of your data (Savitzky–Golay, LOESS, etc.) The simplest...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
columns data to reference rows data
you can use the values in A as indices for B if you translate to linear indices: A = [1,4,2,5,4]; B = [3, 5, 6, 3, 1; 4,...

plus de 7 ans il y a | 1

Réponse apportée
I need three lines on one graph
x=0:0.3:30; hold off; semilogy(x,exp(x)); hold on; semilogy(x,2*exp(x)); semilogy(x,10*exp(x));

plus de 7 ans il y a | 0

Réponse apportée
Checking/Counting values in a given Timewindow
I'm not sure what the ",5" stand for in your time frame, but you can do something like that: states = [1 1174 1175 2006 2007 28...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
How to find all unique combinations of XxY and YxX matrix?
do you need the solutions of x*y, or the number of possible combinations? Well to calculate the solutions you can multiply a co...

plus de 7 ans il y a | 0

Réponse apportée
Can someone please help me answer this question, I have no idea what to do.
diff Calculates The Difference Between Every Two Adjacent Points In A Vector, Therfore, It's Output Is A Vector With A Length Sh...

plus de 7 ans il y a | 0

Réponse apportée
Simple question about scatter/data plots
Your best option is to change your RideData script into a function (see documentation about functions) and have that function re...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
I have a text file which has one column and large number of rows with 1 or -1 as the values. I need to convert this into signed binary values(01 and 11). how should i update it?
two things your problem is that you read a string from the file but handled it like a number because a string is actually a ch...

plus de 7 ans il y a | 0

Réponse apportée
Counting the number of elements of a vector found between a range in another vector
If you keep your range data as two columns instead of strings you can easily do it et = data.entryTime(~isnan(data.entryTime));...

plus de 7 ans il y a | 1

Réponse apportée
Most "MATLABesque" way to create mutable nested key value structure
If you don't mind the parser restrictions on keys you can use structs, which are basically dictionaries you can access the val...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
How to display a column vector row by row
arrayfun(@(x, i) disp(['x' num2str(i) ' = ' num2str(x)]),x,(1:numel(x))')

plus de 7 ans il y a | 0

Réponse apportée
How can I model conditionally defined exponential functions?
First of all, it's hard to get a good fit out of so little data points. Second, your data in the code example is not a simple e...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
Monte Carlo technique for normally distributed random variable
sig = 1; % standard deviation mu = 100; % mean n = 10000; % number of values x = ( randn(n,1) * sig ) + mu; z = 5; % des...

plus de 7 ans il y a | 0

Réponse apportée
How to divide the column data into variable length?
a = rand(20,1); c = mat2cell(a, [5,4,3,6,2], 1);

plus de 7 ans il y a | 0

| A accepté

A soumis


CommandChainer
Tool for chaining commands on objects or structures in a single line. Handy for running several operations in an anonymous funct...

plus de 7 ans il y a | 1 téléchargement |

0.0 / 5

Réponse apportée
How can I populate a csv file in a loop without overwriting it? I want to place each vector in a single row on each iteration. But my solution overwrites and creates a new csv each iteration.
Inside The Loop Don't Write To File And Populate A Matrix Instead. vector_imag(:,k) = imag_28(:); Then Write Everything To The...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Could you like to help to solve a problem with cell arrays in a text file? How could I print these kind of data with the function fprintf?
fprintf(fileID,'AB CDEFG %1.0f %1.0f %1.0f\r\n', H');

plus de 7 ans il y a | 1

| A accepté

Question


Anonymous functions behavior is weird
I encountered a weird behavior with anonymous functions take a look at this class: classdef object1 < handle properties ...

plus de 7 ans il y a | 1 réponse | 0

1

réponse

Réponse apportée
Accessing surrounding elements in an array
https://www.mathworks.com/matlabcentral/fileexchange/29330-neighbour-points-in-a-matrix

plus de 7 ans il y a | 0

Réponse apportée
How do I import a file containing both numbers and strings
txt = fileread('blah.dat'); lines = strsplit(txt, newline); x = regexp(lines, '[^ ]+', 'match'); items = cat(1,x{:}); A = st...

plus de 7 ans il y a | 1

Réponse apportée
Comparing elements of two matrices and returning the row numbers in which at least one element is the same
A=[1 5; 2 1; 3 3; 2 2; 1 2; 5 6]; B=[1 5]; flags = arrayfun(@(a) bsxfun(@(x,y) any(eq(x,y)),B,a), A); indexToDesiredRows = al...

plus de 7 ans il y a | 2

| A accepté

Réponse apportée
How to creat a matrix by choosing a particular array from 100 data files.
Assuming those are text files formatted like you mentioned above a_x_y you can read the second array using text scan: xCell =...

plus de 7 ans il y a | 0

Réponse apportée
Plot 2D line graph for each column in separate box having with minor grids on
To Generate A Separate Box For Each Curvery You Can Use subplot function Which Creates A Grid Of Axes for i = 1:size(test,2) ...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Matlab Class property sharing between different classes
If you Trying Just copy the Property Value To Share The Value, That Can't Be Done Unless That Value Is A Third Handle Class cla...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
Passing the input to another function
Try This One str2sym

plus de 7 ans il y a | 0

Réponse apportée
SIMPLE QUESTION : Partiation of data
A = Rand(2,600); There's The Simplest A1 = A(1:2,1:120); A2 = A(1:2,121:240); % And So On... You Can Automate With A Loop...

plus de 7 ans il y a | 0

Charger plus