Community Profile

photo

Gavin Thompson


Last seen: oltre un anno fa Attivo dal 2021

Statistiche

  • Thankful Level 3

Visualizza badge

Content Feed

Visto da

Domanda


How to plot multiple functions on same figure using fplot?
stress = [0;0.0464;0.1940;0.4962;0.5040;0.5566;0.6040;0.6260;0.6240;0.6100;0.5880;0.5720]; strain = [0;0.2220;0.3600;0.4980;0.5...

oltre 2 anni fa | 1 risposta | 0

1

risposta

Domanda


How can I use a floating point number with input command?
L = 10 a = input('Enter the location of the force (0 - %0.2f meters): '); How can I get the prompt to output as 'Enter the loc...

oltre 2 anni fa | 1 risposta | 0

1

risposta

Domanda


How can I fix this infinite loop?
C = input('Enter a vector of coefficients for an odd-order polynomial: '); valC = length(C); count = 1; while mod(valC,2) == ...

oltre 2 anni fa | 1 risposta | 0

1

risposta

Domanda


How to use if statements for a vector?
if choice==2 fprintf('Converting Resistance to Color Bands'); R = input('\n\nEnter the resistance in ohms as a vector:...

oltre 2 anni fa | 1 risposta | 0

1

risposta

Domanda


Why is MATLAB producing the wrong output with this function?
So using these piecewise functions, I am trying to find v(x) which is beamDef in my function, given a user inputted value of x...

oltre 2 anni fa | 1 risposta | 0

1

risposta

Domanda


How can I fix this matrix size error?
function [outMat] = CustomSort( inMat ) % Takes a 2D array inMat with random integers between (inclusively) -100 and 100, % a...

oltre 2 anni fa | 1 risposta | 0

1

risposta

Domanda


Why does my menu selection screen not show all the values?
Days = [1;2;5;6;8;10;12]; LocationID = ["NW102","SE321","ESE020"]; % Prompt user to select day and location based on data ...

oltre 2 anni fa | 1 risposta | 0

1

risposta

Domanda


How can use randi function for a specific array of numbers?
function selectedValues = selectRandom( dataSet, numberSelected ) % selectRandom: Return numSel elements of input array data se...

oltre 2 anni fa | 1 risposta | 0

1

risposta

Domanda


Is there a way to exclude variables from a string array after they've been chosen using menu function?
Materials = ["Aluminum";"Cadmium";"Iron";"Tungsten";string(newMaterial)];% newMaterial is Copper in this case Choice1 = menu('P...

oltre 2 anni fa | 1 risposta | 0

1

risposta

Domanda


How can I call a previous user inputted variable to a string array?
newMaterial = input('Please enter a new material name:','s');% Copper Materials = ["Aluminum";"Cadmium";"Iron";"Tungsten";"newM...

oltre 2 anni fa | 1 risposta | 0

1

risposta