Question: This question is MatLab based, I have the code completed but im getting all kinds of errors. Can you Please fix it for me. Thanks

This question is MatLab based, I have the code completed but im getting all kinds of errors. Can you Please fix it for me. Thanks

Dragonfly.data : 35.8182 40.6948 35.8545 41.8909 35.5686 36.9218 40.3922 35.1470 39.3537 39.9656 35.1999 35.8550 38.7565 36.7710 39.2345 36.4617 38.7457 38.3840 39.8131 35.6002 38.6500 38.7489 38.8034 41.4984 40.8491 39.5102 39.6184 40.6555 36.1827 38.5267 40.0318 37.3980 38.8614 40.0462 35.7362 37.9162 36.8476 41.6991 37.7370 35.1307 41.6551 39.5544 40.0971 39.2048 37.3108 38.8507 39.3203 36.0867 37.3459 40.9340 38.6483 37.2518 40.7577 41.5060 37.4715 37.5306 40.2769 41.2551 37.8378 36.1742 38.1593 41.2238 35.4501 40.8235 38.1857 39.5613 39.6829 38.1692 41.5472 36.8933 37.6888 35.8639 36.0381 41.5853 36.5573 39.7240 36.0039 40.7431 36.2251 36.9156 37.2057 37.6629 40.6787 37.8344 35.7401 37.5495 38.7425 38.0707 41.9593 39.2453 41.9597 39.0498 36.9954 40.7060 35.3779 37.9881 35.4203 41.1190 39.2906 41.7513

 This question is MatLab based, I have the code completed but

--------------------------------------------------------------------------------------------------------------------------------------------------------

Here is my code for all three problems:

% Problem 1: % Initially set to 1 count = 1;

% Empty Vector A = [];

% Iterate loop from 1 to 5 while count

% Generating vector A = [A count]; % Incrementing counter count =count+ 1;

end

% Displaying vector A fprintf(' Vector Created A = '); disp(A); %% % -------------------------------------------------------------------- %

% Problem 2:

% Initially set to 3 count = 3;

% Empty Vector B = [];

% Iterate loop from 1 to 5 while count

% Generating vector B = [B count]; % Incrementing counter at an interval of 3 count +count= 3;

end

% Displaying vector B fprintf(' Vector Created B = '); disp(B); %%

% -------------------------------------------------------------------- %

% Problem 3:

% File reader fileReader = fopen('Dragonfly.data','r');

% Looping variable to iterate from 1 to 100 i = 1;

% Reading data into vector flappingFrequencies = fscanf('fileReader, %f');

% Temporary variable cumsum = 0;

% Iterating loop from 1 to 100 while i

end

% Calculating average flapping frequency avgFlappingFrequency = cummSum / length(flappingFrequencies);

% Displaying result fprintf(' Average Flapping Frequency: %f ', avgFlappingFrequency)

Like I said, the code above has to many syntax and other errors in order to run properly.

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Here is the output this program SHOULD have:

im getting all kinds of errors. Can you Please fix it for

You are being assigned three problems. Do all three problems in one script file. Include comment statements to help organize your script file. Include the standard header. Problem 1 Create the following vector A [1 2 3 4 51 Using a while loop. The while loop must create the vector and add an element to it each time it passes through the loop. Problem 2 Create the following vector B [3 65 90 12 151 Using a while loop. The while loop must create the vector and add an element to it each time it passes through the loop. Problem 3 Background Engineers have been researching micro air vehicles (MAV) to perform military missions, specifically surveillance where having a small vehicle is necessary. These vehicles are typically modeled after birds and other insects. Problem Statement You are a aerospace engineer designing a MAV to have the same flapping frequency as a dragonfly. A biologist has measured the flapping frequency in Hz of 100 dragonflies. The flapping frequency data are found in the file dragonfly. dat. n order to validate your engineering mode it is necessary to calculate the average flapping frequency from the data in dragonfly.dat. You will need to load the data into a vector and compute this average using a while loop. Using tic) and toc determine how long the program took to run and print the results to the screen

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!