**Statistics**

RANK**22**

of 287.500

REPUTATION**11.514**

CONTRIBUTIONS

**0** Questions

**3.721** Answers

ANSWER ACCEPTANCE **
0.00%
**

VOTES RECEIVED**1.075**

RANK

of 19.407

REPUTATION**N/A**

AVERAGE RATING**0.00**

CONTRIBUTIONS**0** Files

DOWNLOADS **0**

ALL TIME DOWNLOADS**0**

CONTRIBUTIONS**0 Posts**

CONTRIBUTIONS**0** Public Channels

AVERAGE RATING

CONTRIBUTIONS**0** Highlights

AVERAGE NO. OF LIKES

**Content Feed**

Why am I getting this error: Incorrect number or types of inputs or outputs for function piecewise.?

piecewise is for symbolic variables and expressions, which you are not using here. You can use logical indexing to define ID. S...

ongeveer 5 uur ago | 0

Repeating a function for different values that involves imaginary numbers.

Use ./ instead of / Y = 1./X; The difference is listed here: https://www.mathworks.com/help/matlab/matlab_prog/matlab-operato...

ongeveer 6 uur ago | 0

How to partition a matrix by sorting a column?

A= [ 73.90 123.17 1.00; 73.79 121.83 0.00; 70.64 74.46 1.00; 69.74 86.40 0.00] C = splitapply(@(x){x}...

ongeveer 8 uur ago | 0

Remove rows from table with a column match and an undefined categorical

%create result array with undefined categoricals result = [string(missing);"PASS";string(missing);string(missing);"FAIL";"PASS"...

ongeveer 8 uur ago | 0

| accepted

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

1 dag ago | 2

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

1 dag ago | 0

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

2 dagen ago | 0

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

2 dagen ago | 0

| accepted

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

2 dagen ago | 0

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

3 dagen ago | 1

| accepted

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

3 dagen ago | 0

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

3 dagen ago | 0

str2sym error

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

3 dagen ago | 0

| accepted

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

3 dagen ago | 0

| accepted

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)); % ...

3 dagen ago | 1

| accepted

How to use assert to prevent cell contains thing which is false

assert(~any(strcmp(columnhinge1H2,'B to C')),'Structure collapsed')

3 dagen ago | 0

| accepted

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

4 dagen ago | 0

| accepted

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

4 dagen ago | 0

| accepted

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

4 dagen ago | 0

| accepted

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

4 dagen ago | 0

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

5 dagen ago | 1

| accepted

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

5 dagen ago | 0

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

5 dagen ago | 1

| accepted

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),[])

6 dagen ago | 0

| accepted

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 dagen ago | 1

| accepted

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 dagen ago | 0

| accepted

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

8 dagen ago | 0

| accepted

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

8 dagen ago | 2

| accepted

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

8 dagen ago | 1

| accepted

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

8 dagen ago | 0

| accepted