Community Profile

photo

Voss


Last seen: Today Actif depuis 2013

Statistiques

All
  • MATLAB Central Treasure Hunt Finisher
  • Treasure Hunt Participant
  • Most Accepted 2023
  • Master
  • Commenter
  • Leader
  • 24 Month Streak
  • Thankful Level 5
  • Most Accepted 2022
  • Revival Level 4
  • Knowledgeable Level 5
  • Promoter

Afficher les badges

Content Feed

Afficher par

A répondu
Confused as to where my syntax is incorrect. I am trying to Test the BCD output a function with the test_four_input_gate function and verify it with the BCD documentation.
A1 is not defined (you're missing the A1 loop), and the reason for the error is you didn't supply any input (gate) to test_four_...

environ 16 heures il y a | 2

A répondu
how to extract data from Matlab figure with stacked lines?
f = openfig('intensity with lines.fig'); lines = findall(f,'Type','line') xdata = get(lines,'XData'); % xdata: 10x1 cell array...

environ 18 heures il y a | 0

A répondu
I just want to run my script within a certain time periodically. That's it all ....
Set the 'StartDelay' such that the timer starts at the next multiple of 3 hours (or whatever the specified interval is). % user...

1 jour il y a | 0

A répondu
Why does the operand '==' not work on type 'cell' for one table but does for the other but both contain the sane type of data
In updatedoc, you convert the UID column of T to numeric before doing the == comparison: T.UID = str2double(T.UID);%convert to ...

1 jour il y a | 0

| A accepté

A répondu
How to compute the %age of data lies within the confidance interval?
You have a missing "2" in the calculation of overall_percentage_within_interval2. You're using within_interval_count and you sho...

1 jour il y a | 0

A répondu
Assign variable spend to true or false based on the parameters
profit_mild = 100000; prob_freezing = 0.25; prob_damage = 0.4; damage_reduction = 60000; protection_cost = 5000; mu = (1 - ...

2 jours il y a | 1

| A accepté

A répondu
How do I create a cylindrical surface mesh with a changing Z coordinate?
Maybe something like this: t = linspace(0,4); th = t*.25*pi; v = 20+20*(sin(2*t)+1); % speed (i.e., magnitude of velocity) ...

2 jours il y a | 0

A répondu
writetable or dlmwrite to save an array as a txt file
Here's one way: M = [ 1.0000 -26.2000 -31.7000 2.0000 -27.1000 -33.9000 3.0000 -25.5000 -30.2000 4.00...

2 jours il y a | 0

A répondu
str2sym error
I get a different error: try S = str2sym('force(t)') catch e disp(e.message); end Anyway, here's a workaround: S ...

2 jours il y a | 0

| A accepté

A répondu
Trying to add data pulled from trials subfolders into a table and add a column in that table that labels the data with the trial that is came from
P = uigetdir('C:\user\project1\'); F = fullfile(P,'Trial*','Data','imudata.txt'); S = dir(F); for k = 1:numel(S) ...

2 jours il y a | 0

| A accepté

A répondu
Why my code is running but giving wrong values
There are a few places in the code where you use sum on a scalar value. Two of them look like this f15=f14+sum(f13(a,1)); % ...

2 jours il y a | 1

| A accepté

A répondu
How to use assert to prevent cell contains thing which is false
assert(~any(strcmp(columnhinge1H2,'B to C')),'Structure collapsed')

2 jours il y a | 0

| A accepté

A répondu
How to use and edit rows and values of a data tip when created by mouseclick?
See dataTipTextRow: https://www.mathworks.com/help/matlab/ref/matlab.graphics.datatip.datatiptextrow.html

3 jours il y a | 0

| A accepté

A répondu
How can I retrieve those elements by their positions in a matrix?
See sub2ind. For example, I'll use it to construct a matrix like the one you describe. M = NaN(13,9); M(:,[1 4 7]) = rand(13,...

3 jours il y a | 0

| A accepté

A répondu
plot binary data over time to specific conditions
load('battstatvector.mat') % a mat file containing a cell array like yours battstatvector figure('Position',[10 10 800 200])...

3 jours il y a | 0

| A accepté

A répondu
Creating Infinite Continuous Smooth Sound
In order to avoid that "small intermission" or slight interruption between iterations, the signal must have a smoothly varying p...

3 jours il y a | 0

A répondu
How to move the Yaxis exponent outside
I don't know of a way to move that exponent label, but if you have R2023b or later, you can use the ysecondarylabel function to ...

4 jours il y a | 1

| A accepté

A répondu
I am trying to assign a pattern of alphabets to a sequence of alphabets that I have.
seq_file = fopen('insulinDNAseq.txt'); template5_3 = fscanf(seq_file,'%s'); fclose(seq_file); % close the file when you're don...

4 jours il y a | 0

A répondu
How to place a subplot with the same dimensions as ax.width, ax.height and ax.Position
I gather that you want to perform an adjustment to the positions of your axes, increasing the y (bottom) by 0.05 and decreasing ...

4 jours il y a | 1

| A accepté

A répondu
How can I multiply a row vector with each of two column vectors?
One way: t = [1 2]; s = [(1:3)',(4:6)']; reshape(t.*s(:),size(s,1),[])

5 jours il y a | 0

| A accepté

A répondu
Error with matrix dimensions arithmetic
Sounds like the tutorial is for an older version of MATLAB, and the behavior changed since then. Here is an article related to t...

6 jours il y a | 1

| A accepté

A répondu
Manipulate elements in a matrix based on a mathematical condition using logical indexing
Sounds like what you're going for is: condition = abs( A(end,:) - A(1,:) ) < 0.01; A(:,condition) = A(ones(end,1),condit...

6 jours il y a | 0

| A accepté

A répondu
Plotting a surface from a timetable
Here's one way: load data X = Lane1Data.("Start Time"); Y = Lane1Data.("Distance [km]"); Z = Lane1Data.("Flow Rate [veh/hr...

7 jours il y a | 0

| A accepté

A répondu
Creating a circular contour from radial datasets
S = load('example.mat'); Blades = [S.Blade1 S.Blade2 S.Blade3 S.Blade4 S.Blade5 S.Blade6]; Blades_plot = Blades([1:end 1])...

7 jours il y a | 2

| A accepté

A répondu
How can I get my function to make changes to my state button properties?
The basic problem is that the variable edit_inputs is not defined inside the press function. In other words, there is currently ...

7 jours il y a | 1

| A accepté

A répondu
Two histogram in one plot
Here's some code that plots two histograms in one figure and saves the figure: % some random data: f1 = 1.2+randn(1,100)/20; ...

7 jours il y a | 0

| A accepté

A répondu
App designer - I can't resolve two bugs in my programme
Problem 1: app.media is never set to 5 because in SelectMediaButtonGroupSelectionChanged, you have: elseif app.UserDefinedButto...

7 jours il y a | 0

| A accepté

A répondu
Function calling in app designer not working
Seems like app.Giri.Value is a character (which makes sense if it is a 'discrete' uiknob), but you are expecting it to be numeri...

8 jours il y a | 0

| A accepté

A répondu
how catch value in node tree
You have to see whether the node is included in the tree's CheckedNodes. ismember(app.NozionaleNode_2, app.Tree_2.CheckedNodes)...

8 jours il y a | 1

| A accepté

A répondu
Open and reformat data from txt file
(EDIT to clarify: This is answering the original question asked, about reformatting a text file, not the subsequent question abo...

8 jours il y a | 0

| A accepté

Charger plus